mavlink/home/runner/work/rust-mavlink/rust-mavlink/target/debug/build/mavlink-82e5138eb12fa796/out/
ualberta.rs

1#![doc = "MAVLink ualberta dialect."]
2#![doc = ""]
3#![doc = "This file was automatically generated, do not edit."]
4#![allow(deprecated)]
5#[cfg(feature = "arbitrary")]
6use arbitrary::Arbitrary;
7#[allow(unused_imports)]
8use bitflags::bitflags;
9use mavlink_core::{bytes::Bytes, bytes_mut::BytesMut, MavlinkVersion, Message, MessageData};
10#[allow(unused_imports)]
11use num_derive::FromPrimitive;
12#[allow(unused_imports)]
13use num_derive::ToPrimitive;
14#[allow(unused_imports)]
15use num_traits::FromPrimitive;
16#[allow(unused_imports)]
17use num_traits::ToPrimitive;
18#[cfg(feature = "serde")]
19use serde::{Deserialize, Serialize};
20pub const MINOR_MAVLINK_VERSION: u8 = 3u8;
21#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
22#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23#[cfg_attr(feature = "serde", serde(tag = "type"))]
24#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25#[repr(u32)]
26#[doc = "Actuator configuration, used to change a setting on an actuator. Component information metadata can be used to know which outputs support which commands."]
27pub enum ActuatorConfiguration {
28    #[doc = "Do nothing."]
29    ACTUATOR_CONFIGURATION_NONE = 0,
30    #[doc = "Command the actuator to beep now."]
31    ACTUATOR_CONFIGURATION_BEEP = 1,
32    #[doc = "Permanently set the actuator (ESC) to 3D mode (reversible thrust)."]
33    ACTUATOR_CONFIGURATION_3D_MODE_ON = 2,
34    #[doc = "Permanently set the actuator (ESC) to non 3D mode (non-reversible thrust)."]
35    ACTUATOR_CONFIGURATION_3D_MODE_OFF = 3,
36    #[doc = "Permanently set the actuator (ESC) to spin direction 1 (which can be clockwise or counter-clockwise)."]
37    ACTUATOR_CONFIGURATION_SPIN_DIRECTION1 = 4,
38    #[doc = "Permanently set the actuator (ESC) to spin direction 2 (opposite of direction 1)."]
39    ACTUATOR_CONFIGURATION_SPIN_DIRECTION2 = 5,
40}
41impl ActuatorConfiguration {
42    pub const DEFAULT: Self = Self::ACTUATOR_CONFIGURATION_NONE;
43}
44impl Default for ActuatorConfiguration {
45    fn default() -> Self {
46        Self::DEFAULT
47    }
48}
49#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
50#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
51#[cfg_attr(feature = "serde", serde(tag = "type"))]
52#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
53#[repr(u32)]
54#[doc = "Actuator output function. Values greater or equal to 1000 are autopilot-specific."]
55pub enum ActuatorOutputFunction {
56    #[doc = "No function (disabled)."]
57    ACTUATOR_OUTPUT_FUNCTION_NONE = 0,
58    #[doc = "Motor 1"]
59    ACTUATOR_OUTPUT_FUNCTION_MOTOR1 = 1,
60    #[doc = "Motor 2"]
61    ACTUATOR_OUTPUT_FUNCTION_MOTOR2 = 2,
62    #[doc = "Motor 3"]
63    ACTUATOR_OUTPUT_FUNCTION_MOTOR3 = 3,
64    #[doc = "Motor 4"]
65    ACTUATOR_OUTPUT_FUNCTION_MOTOR4 = 4,
66    #[doc = "Motor 5"]
67    ACTUATOR_OUTPUT_FUNCTION_MOTOR5 = 5,
68    #[doc = "Motor 6"]
69    ACTUATOR_OUTPUT_FUNCTION_MOTOR6 = 6,
70    #[doc = "Motor 7"]
71    ACTUATOR_OUTPUT_FUNCTION_MOTOR7 = 7,
72    #[doc = "Motor 8"]
73    ACTUATOR_OUTPUT_FUNCTION_MOTOR8 = 8,
74    #[doc = "Motor 9"]
75    ACTUATOR_OUTPUT_FUNCTION_MOTOR9 = 9,
76    #[doc = "Motor 10"]
77    ACTUATOR_OUTPUT_FUNCTION_MOTOR10 = 10,
78    #[doc = "Motor 11"]
79    ACTUATOR_OUTPUT_FUNCTION_MOTOR11 = 11,
80    #[doc = "Motor 12"]
81    ACTUATOR_OUTPUT_FUNCTION_MOTOR12 = 12,
82    #[doc = "Motor 13"]
83    ACTUATOR_OUTPUT_FUNCTION_MOTOR13 = 13,
84    #[doc = "Motor 14"]
85    ACTUATOR_OUTPUT_FUNCTION_MOTOR14 = 14,
86    #[doc = "Motor 15"]
87    ACTUATOR_OUTPUT_FUNCTION_MOTOR15 = 15,
88    #[doc = "Motor 16"]
89    ACTUATOR_OUTPUT_FUNCTION_MOTOR16 = 16,
90    #[doc = "Servo 1"]
91    ACTUATOR_OUTPUT_FUNCTION_SERVO1 = 33,
92    #[doc = "Servo 2"]
93    ACTUATOR_OUTPUT_FUNCTION_SERVO2 = 34,
94    #[doc = "Servo 3"]
95    ACTUATOR_OUTPUT_FUNCTION_SERVO3 = 35,
96    #[doc = "Servo 4"]
97    ACTUATOR_OUTPUT_FUNCTION_SERVO4 = 36,
98    #[doc = "Servo 5"]
99    ACTUATOR_OUTPUT_FUNCTION_SERVO5 = 37,
100    #[doc = "Servo 6"]
101    ACTUATOR_OUTPUT_FUNCTION_SERVO6 = 38,
102    #[doc = "Servo 7"]
103    ACTUATOR_OUTPUT_FUNCTION_SERVO7 = 39,
104    #[doc = "Servo 8"]
105    ACTUATOR_OUTPUT_FUNCTION_SERVO8 = 40,
106    #[doc = "Servo 9"]
107    ACTUATOR_OUTPUT_FUNCTION_SERVO9 = 41,
108    #[doc = "Servo 10"]
109    ACTUATOR_OUTPUT_FUNCTION_SERVO10 = 42,
110    #[doc = "Servo 11"]
111    ACTUATOR_OUTPUT_FUNCTION_SERVO11 = 43,
112    #[doc = "Servo 12"]
113    ACTUATOR_OUTPUT_FUNCTION_SERVO12 = 44,
114    #[doc = "Servo 13"]
115    ACTUATOR_OUTPUT_FUNCTION_SERVO13 = 45,
116    #[doc = "Servo 14"]
117    ACTUATOR_OUTPUT_FUNCTION_SERVO14 = 46,
118    #[doc = "Servo 15"]
119    ACTUATOR_OUTPUT_FUNCTION_SERVO15 = 47,
120    #[doc = "Servo 16"]
121    ACTUATOR_OUTPUT_FUNCTION_SERVO16 = 48,
122}
123impl ActuatorOutputFunction {
124    pub const DEFAULT: Self = Self::ACTUATOR_OUTPUT_FUNCTION_NONE;
125}
126impl Default for ActuatorOutputFunction {
127    fn default() -> Self {
128        Self::DEFAULT
129    }
130}
131#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
132#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
133#[cfg_attr(feature = "serde", serde(tag = "type"))]
134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
135#[repr(u32)]
136#[doc = "Enumeration of the ADSB altimeter types"]
137pub enum AdsbAltitudeType {
138    #[doc = "Altitude reported from a Baro source using QNH reference"]
139    ADSB_ALTITUDE_TYPE_PRESSURE_QNH = 0,
140    #[doc = "Altitude reported from a GNSS source"]
141    ADSB_ALTITUDE_TYPE_GEOMETRIC = 1,
142}
143impl AdsbAltitudeType {
144    pub const DEFAULT: Self = Self::ADSB_ALTITUDE_TYPE_PRESSURE_QNH;
145}
146impl Default for AdsbAltitudeType {
147    fn default() -> Self {
148        Self::DEFAULT
149    }
150}
151#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
152#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
153#[cfg_attr(feature = "serde", serde(tag = "type"))]
154#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
155#[repr(u32)]
156#[doc = "ADSB classification for the type of vehicle emitting the transponder signal"]
157pub enum AdsbEmitterType {
158    ADSB_EMITTER_TYPE_NO_INFO = 0,
159    ADSB_EMITTER_TYPE_LIGHT = 1,
160    ADSB_EMITTER_TYPE_SMALL = 2,
161    ADSB_EMITTER_TYPE_LARGE = 3,
162    ADSB_EMITTER_TYPE_HIGH_VORTEX_LARGE = 4,
163    ADSB_EMITTER_TYPE_HEAVY = 5,
164    ADSB_EMITTER_TYPE_HIGHLY_MANUV = 6,
165    ADSB_EMITTER_TYPE_ROTOCRAFT = 7,
166    ADSB_EMITTER_TYPE_UNASSIGNED = 8,
167    ADSB_EMITTER_TYPE_GLIDER = 9,
168    ADSB_EMITTER_TYPE_LIGHTER_AIR = 10,
169    ADSB_EMITTER_TYPE_PARACHUTE = 11,
170    ADSB_EMITTER_TYPE_ULTRA_LIGHT = 12,
171    ADSB_EMITTER_TYPE_UNASSIGNED2 = 13,
172    ADSB_EMITTER_TYPE_UAV = 14,
173    ADSB_EMITTER_TYPE_SPACE = 15,
174    ADSB_EMITTER_TYPE_UNASSGINED3 = 16,
175    ADSB_EMITTER_TYPE_EMERGENCY_SURFACE = 17,
176    ADSB_EMITTER_TYPE_SERVICE_SURFACE = 18,
177    ADSB_EMITTER_TYPE_POINT_OBSTACLE = 19,
178}
179impl AdsbEmitterType {
180    pub const DEFAULT: Self = Self::ADSB_EMITTER_TYPE_NO_INFO;
181}
182impl Default for AdsbEmitterType {
183    fn default() -> Self {
184        Self::DEFAULT
185    }
186}
187bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags indicate status such as data validity of each data source. Set = data valid"] pub struct AdsbFlags : u16 { const ADSB_FLAGS_VALID_COORDS = 1 ; const ADSB_FLAGS_VALID_ALTITUDE = 2 ; const ADSB_FLAGS_VALID_HEADING = 4 ; const ADSB_FLAGS_VALID_VELOCITY = 8 ; const ADSB_FLAGS_VALID_CALLSIGN = 16 ; const ADSB_FLAGS_VALID_SQUAWK = 32 ; const ADSB_FLAGS_SIMULATED = 64 ; const ADSB_FLAGS_VERTICAL_VELOCITY_VALID = 128 ; const ADSB_FLAGS_BARO_VALID = 256 ; const ADSB_FLAGS_SOURCE_UAT = 32768 ; } }
188impl AdsbFlags {
189    pub const DEFAULT: Self = Self::ADSB_FLAGS_VALID_COORDS;
190}
191impl Default for AdsbFlags {
192    fn default() -> Self {
193        Self::DEFAULT
194    }
195}
196bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags are used in the AIS_VESSEL.fields bitmask to indicate validity of data in the other message fields. When set, the data is valid."] pub struct AisFlags : u16 { # [doc = "1 = Position accuracy less than 10m, 0 = position accuracy greater than 10m."] const AIS_FLAGS_POSITION_ACCURACY = 1 ; const AIS_FLAGS_VALID_COG = 2 ; const AIS_FLAGS_VALID_VELOCITY = 4 ; # [doc = "1 = Velocity over 52.5765m/s (102.2 knots)"] const AIS_FLAGS_HIGH_VELOCITY = 8 ; const AIS_FLAGS_VALID_TURN_RATE = 16 ; # [doc = "Only the sign of the returned turn rate value is valid, either greater than 5deg/30s or less than -5deg/30s"] const AIS_FLAGS_TURN_RATE_SIGN_ONLY = 32 ; const AIS_FLAGS_VALID_DIMENSIONS = 64 ; # [doc = "Distance to bow is larger than 511m"] const AIS_FLAGS_LARGE_BOW_DIMENSION = 128 ; # [doc = "Distance to stern is larger than 511m"] const AIS_FLAGS_LARGE_STERN_DIMENSION = 256 ; # [doc = "Distance to port side is larger than 63m"] const AIS_FLAGS_LARGE_PORT_DIMENSION = 512 ; # [doc = "Distance to starboard side is larger than 63m"] const AIS_FLAGS_LARGE_STARBOARD_DIMENSION = 1024 ; const AIS_FLAGS_VALID_CALLSIGN = 2048 ; const AIS_FLAGS_VALID_NAME = 4096 ; } }
197impl AisFlags {
198    pub const DEFAULT: Self = Self::AIS_FLAGS_POSITION_ACCURACY;
199}
200impl Default for AisFlags {
201    fn default() -> Self {
202        Self::DEFAULT
203    }
204}
205#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
206#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
207#[cfg_attr(feature = "serde", serde(tag = "type"))]
208#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
209#[repr(u32)]
210#[doc = "Navigational status of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
211pub enum AisNavStatus {
212    #[doc = "Under way using engine."]
213    UNDER_WAY = 0,
214    AIS_NAV_ANCHORED = 1,
215    AIS_NAV_UN_COMMANDED = 2,
216    AIS_NAV_RESTRICTED_MANOEUVERABILITY = 3,
217    AIS_NAV_DRAUGHT_CONSTRAINED = 4,
218    AIS_NAV_MOORED = 5,
219    AIS_NAV_AGROUND = 6,
220    AIS_NAV_FISHING = 7,
221    AIS_NAV_SAILING = 8,
222    AIS_NAV_RESERVED_HSC = 9,
223    AIS_NAV_RESERVED_WIG = 10,
224    AIS_NAV_RESERVED_1 = 11,
225    AIS_NAV_RESERVED_2 = 12,
226    AIS_NAV_RESERVED_3 = 13,
227    #[doc = "Search And Rescue Transponder."]
228    AIS_NAV_AIS_SART = 14,
229    #[doc = "Not available (default)."]
230    AIS_NAV_UNKNOWN = 15,
231}
232impl AisNavStatus {
233    pub const DEFAULT: Self = Self::UNDER_WAY;
234}
235impl Default for AisNavStatus {
236    fn default() -> Self {
237        Self::DEFAULT
238    }
239}
240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
242#[cfg_attr(feature = "serde", serde(tag = "type"))]
243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
244#[repr(u32)]
245#[doc = "Type of AIS vessel, enum duplicated from AIS standard, <https://gpsd.gitlab.io/gpsd/AIVDM.html>"]
246pub enum AisType {
247    #[doc = "Not available (default)."]
248    AIS_TYPE_UNKNOWN = 0,
249    AIS_TYPE_RESERVED_1 = 1,
250    AIS_TYPE_RESERVED_2 = 2,
251    AIS_TYPE_RESERVED_3 = 3,
252    AIS_TYPE_RESERVED_4 = 4,
253    AIS_TYPE_RESERVED_5 = 5,
254    AIS_TYPE_RESERVED_6 = 6,
255    AIS_TYPE_RESERVED_7 = 7,
256    AIS_TYPE_RESERVED_8 = 8,
257    AIS_TYPE_RESERVED_9 = 9,
258    AIS_TYPE_RESERVED_10 = 10,
259    AIS_TYPE_RESERVED_11 = 11,
260    AIS_TYPE_RESERVED_12 = 12,
261    AIS_TYPE_RESERVED_13 = 13,
262    AIS_TYPE_RESERVED_14 = 14,
263    AIS_TYPE_RESERVED_15 = 15,
264    AIS_TYPE_RESERVED_16 = 16,
265    AIS_TYPE_RESERVED_17 = 17,
266    AIS_TYPE_RESERVED_18 = 18,
267    AIS_TYPE_RESERVED_19 = 19,
268    #[doc = "Wing In Ground effect."]
269    AIS_TYPE_WIG = 20,
270    AIS_TYPE_WIG_HAZARDOUS_A = 21,
271    AIS_TYPE_WIG_HAZARDOUS_B = 22,
272    AIS_TYPE_WIG_HAZARDOUS_C = 23,
273    AIS_TYPE_WIG_HAZARDOUS_D = 24,
274    AIS_TYPE_WIG_RESERVED_1 = 25,
275    AIS_TYPE_WIG_RESERVED_2 = 26,
276    AIS_TYPE_WIG_RESERVED_3 = 27,
277    AIS_TYPE_WIG_RESERVED_4 = 28,
278    AIS_TYPE_WIG_RESERVED_5 = 29,
279    AIS_TYPE_FISHING = 30,
280    AIS_TYPE_TOWING = 31,
281    #[doc = "Towing: length exceeds 200m or breadth exceeds 25m."]
282    AIS_TYPE_TOWING_LARGE = 32,
283    #[doc = "Dredging or other underwater ops."]
284    AIS_TYPE_DREDGING = 33,
285    AIS_TYPE_DIVING = 34,
286    AIS_TYPE_MILITARY = 35,
287    AIS_TYPE_SAILING = 36,
288    AIS_TYPE_PLEASURE = 37,
289    AIS_TYPE_RESERVED_20 = 38,
290    AIS_TYPE_RESERVED_21 = 39,
291    #[doc = "High Speed Craft."]
292    AIS_TYPE_HSC = 40,
293    AIS_TYPE_HSC_HAZARDOUS_A = 41,
294    AIS_TYPE_HSC_HAZARDOUS_B = 42,
295    AIS_TYPE_HSC_HAZARDOUS_C = 43,
296    AIS_TYPE_HSC_HAZARDOUS_D = 44,
297    AIS_TYPE_HSC_RESERVED_1 = 45,
298    AIS_TYPE_HSC_RESERVED_2 = 46,
299    AIS_TYPE_HSC_RESERVED_3 = 47,
300    AIS_TYPE_HSC_RESERVED_4 = 48,
301    AIS_TYPE_HSC_UNKNOWN = 49,
302    AIS_TYPE_PILOT = 50,
303    #[doc = "Search And Rescue vessel."]
304    AIS_TYPE_SAR = 51,
305    AIS_TYPE_TUG = 52,
306    AIS_TYPE_PORT_TENDER = 53,
307    #[doc = "Anti-pollution equipment."]
308    AIS_TYPE_ANTI_POLLUTION = 54,
309    AIS_TYPE_LAW_ENFORCEMENT = 55,
310    AIS_TYPE_SPARE_LOCAL_1 = 56,
311    AIS_TYPE_SPARE_LOCAL_2 = 57,
312    AIS_TYPE_MEDICAL_TRANSPORT = 58,
313    #[doc = "Noncombatant ship according to RR Resolution No. 18."]
314    AIS_TYPE_NONECOMBATANT = 59,
315    AIS_TYPE_PASSENGER = 60,
316    AIS_TYPE_PASSENGER_HAZARDOUS_A = 61,
317    AIS_TYPE_PASSENGER_HAZARDOUS_B = 62,
318    AIS_TYPE_PASSENGER_HAZARDOUS_C = 63,
319    AIS_TYPE_PASSENGER_HAZARDOUS_D = 64,
320    AIS_TYPE_PASSENGER_RESERVED_1 = 65,
321    AIS_TYPE_PASSENGER_RESERVED_2 = 66,
322    AIS_TYPE_PASSENGER_RESERVED_3 = 67,
323    AIS_TYPE_PASSENGER_RESERVED_4 = 68,
324    AIS_TYPE_PASSENGER_UNKNOWN = 69,
325    AIS_TYPE_CARGO = 70,
326    AIS_TYPE_CARGO_HAZARDOUS_A = 71,
327    AIS_TYPE_CARGO_HAZARDOUS_B = 72,
328    AIS_TYPE_CARGO_HAZARDOUS_C = 73,
329    AIS_TYPE_CARGO_HAZARDOUS_D = 74,
330    AIS_TYPE_CARGO_RESERVED_1 = 75,
331    AIS_TYPE_CARGO_RESERVED_2 = 76,
332    AIS_TYPE_CARGO_RESERVED_3 = 77,
333    AIS_TYPE_CARGO_RESERVED_4 = 78,
334    AIS_TYPE_CARGO_UNKNOWN = 79,
335    AIS_TYPE_TANKER = 80,
336    AIS_TYPE_TANKER_HAZARDOUS_A = 81,
337    AIS_TYPE_TANKER_HAZARDOUS_B = 82,
338    AIS_TYPE_TANKER_HAZARDOUS_C = 83,
339    AIS_TYPE_TANKER_HAZARDOUS_D = 84,
340    AIS_TYPE_TANKER_RESERVED_1 = 85,
341    AIS_TYPE_TANKER_RESERVED_2 = 86,
342    AIS_TYPE_TANKER_RESERVED_3 = 87,
343    AIS_TYPE_TANKER_RESERVED_4 = 88,
344    AIS_TYPE_TANKER_UNKNOWN = 89,
345    AIS_TYPE_OTHER = 90,
346    AIS_TYPE_OTHER_HAZARDOUS_A = 91,
347    AIS_TYPE_OTHER_HAZARDOUS_B = 92,
348    AIS_TYPE_OTHER_HAZARDOUS_C = 93,
349    AIS_TYPE_OTHER_HAZARDOUS_D = 94,
350    AIS_TYPE_OTHER_RESERVED_1 = 95,
351    AIS_TYPE_OTHER_RESERVED_2 = 96,
352    AIS_TYPE_OTHER_RESERVED_3 = 97,
353    AIS_TYPE_OTHER_RESERVED_4 = 98,
354    AIS_TYPE_OTHER_UNKNOWN = 99,
355}
356impl AisType {
357    pub const DEFAULT: Self = Self::AIS_TYPE_UNKNOWN;
358}
359impl Default for AisType {
360    fn default() -> Self {
361        Self::DEFAULT
362    }
363}
364bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b00000000 indicates that none of the setpoint dimensions should be ignored."] pub struct AttitudeTargetTypemask : u8 { # [doc = "Ignore body roll rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE = 1 ; # [doc = "Ignore body pitch rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_PITCH_RATE_IGNORE = 2 ; # [doc = "Ignore body yaw rate"] const ATTITUDE_TARGET_TYPEMASK_BODY_YAW_RATE_IGNORE = 4 ; # [doc = "Use 3D body thrust setpoint instead of throttle"] const ATTITUDE_TARGET_TYPEMASK_THRUST_BODY_SET = 32 ; # [doc = "Ignore throttle"] const ATTITUDE_TARGET_TYPEMASK_THROTTLE_IGNORE = 64 ; # [doc = "Ignore attitude"] const ATTITUDE_TARGET_TYPEMASK_ATTITUDE_IGNORE = 128 ; } }
365impl AttitudeTargetTypemask {
366    pub const DEFAULT: Self = Self::ATTITUDE_TARGET_TYPEMASK_BODY_ROLL_RATE_IGNORE;
367}
368impl Default for AttitudeTargetTypemask {
369    fn default() -> Self {
370        Self::DEFAULT
371    }
372}
373#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
374#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
375#[cfg_attr(feature = "serde", serde(tag = "type"))]
376#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
377#[repr(u32)]
378#[doc = "Axes that will be autotuned by MAV_CMD_DO_AUTOTUNE_ENABLE.         Note that at least one flag must be set in MAV_CMD_DO_AUTOTUNE_ENABLE.param2: if none are set, the flight stack will tune its default set of axes."]
379pub enum AutotuneAxis {
380    #[doc = "Autotune roll axis."]
381    AUTOTUNE_AXIS_ROLL = 1,
382    #[doc = "Autotune pitch axis."]
383    AUTOTUNE_AXIS_PITCH = 2,
384    #[doc = "Autotune yaw axis."]
385    AUTOTUNE_AXIS_YAW = 4,
386}
387impl AutotuneAxis {
388    pub const DEFAULT: Self = Self::AUTOTUNE_AXIS_ROLL;
389}
390impl Default for AutotuneAxis {
391    fn default() -> Self {
392        Self::DEFAULT
393    }
394}
395bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera capability flags (Bitmap)"] pub struct CameraCapFlags : u32 { # [doc = "Camera is able to record video"] const CAMERA_CAP_FLAGS_CAPTURE_VIDEO = 1 ; # [doc = "Camera is able to capture images"] const CAMERA_CAP_FLAGS_CAPTURE_IMAGE = 2 ; # [doc = "Camera has separate Video and Image/Photo modes (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_MODES = 4 ; # [doc = "Camera can capture images while in video mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_IMAGE_IN_VIDEO_MODE = 8 ; # [doc = "Camera can capture videos while in Photo/Image mode"] const CAMERA_CAP_FLAGS_CAN_CAPTURE_VIDEO_IN_IMAGE_MODE = 16 ; # [doc = "Camera has image survey mode (MAV_CMD_SET_CAMERA_MODE)"] const CAMERA_CAP_FLAGS_HAS_IMAGE_SURVEY_MODE = 32 ; # [doc = "Camera has basic zoom control (MAV_CMD_SET_CAMERA_ZOOM)"] const CAMERA_CAP_FLAGS_HAS_BASIC_ZOOM = 64 ; # [doc = "Camera has basic focus control (MAV_CMD_SET_CAMERA_FOCUS)"] const CAMERA_CAP_FLAGS_HAS_BASIC_FOCUS = 128 ; # [doc = "Camera has video streaming capabilities (request VIDEO_STREAM_INFORMATION with MAV_CMD_REQUEST_MESSAGE for video streaming info)"] const CAMERA_CAP_FLAGS_HAS_VIDEO_STREAM = 256 ; # [doc = "Camera supports tracking of a point on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_POINT = 512 ; # [doc = "Camera supports tracking of a selection rectangle on the camera view."] const CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE = 1024 ; # [doc = "Camera supports tracking geo status (CAMERA_TRACKING_GEO_STATUS)."] const CAMERA_CAP_FLAGS_HAS_TRACKING_GEO_STATUS = 2048 ; # [doc = "Camera supports absolute thermal range (request CAMERA_THERMAL_RANGE with MAV_CMD_REQUEST_MESSAGE)."] const CAMERA_CAP_FLAGS_HAS_THERMAL_RANGE = 4096 ; } }
396impl CameraCapFlags {
397    pub const DEFAULT: Self = Self::CAMERA_CAP_FLAGS_CAPTURE_VIDEO;
398}
399impl Default for CameraCapFlags {
400    fn default() -> Self {
401        Self::DEFAULT
402    }
403}
404#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
406#[cfg_attr(feature = "serde", serde(tag = "type"))]
407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
408#[repr(u32)]
409#[doc = "Camera Modes."]
410pub enum CameraMode {
411    #[doc = "Camera is in image/photo capture mode."]
412    CAMERA_MODE_IMAGE = 0,
413    #[doc = "Camera is in video capture mode."]
414    CAMERA_MODE_VIDEO = 1,
415    #[doc = "Camera is in image survey capture mode. It allows for camera controller to do specific settings for surveys."]
416    CAMERA_MODE_IMAGE_SURVEY = 2,
417}
418impl CameraMode {
419    pub const DEFAULT: Self = Self::CAMERA_MODE_IMAGE;
420}
421impl Default for CameraMode {
422    fn default() -> Self {
423        Self::DEFAULT
424    }
425}
426#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
427#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
428#[cfg_attr(feature = "serde", serde(tag = "type"))]
429#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
430#[repr(u32)]
431#[doc = "Camera sources for MAV_CMD_SET_CAMERA_SOURCE"]
432pub enum CameraSource {
433    #[doc = "Default camera source."]
434    CAMERA_SOURCE_DEFAULT = 0,
435    #[doc = "RGB camera source."]
436    CAMERA_SOURCE_RGB = 1,
437    #[doc = "IR camera source."]
438    CAMERA_SOURCE_IR = 2,
439    #[doc = "NDVI camera source."]
440    CAMERA_SOURCE_NDVI = 3,
441}
442impl CameraSource {
443    pub const DEFAULT: Self = Self::CAMERA_SOURCE_DEFAULT;
444}
445impl Default for CameraSource {
446    fn default() -> Self {
447        Self::DEFAULT
448    }
449}
450#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
451#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
452#[cfg_attr(feature = "serde", serde(tag = "type"))]
453#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
454#[repr(u32)]
455#[doc = "Camera tracking modes"]
456pub enum CameraTrackingMode {
457    #[doc = "Not tracking"]
458    CAMERA_TRACKING_MODE_NONE = 0,
459    #[doc = "Target is a point"]
460    CAMERA_TRACKING_MODE_POINT = 1,
461    #[doc = "Target is a rectangle"]
462    CAMERA_TRACKING_MODE_RECTANGLE = 2,
463}
464impl CameraTrackingMode {
465    pub const DEFAULT: Self = Self::CAMERA_TRACKING_MODE_NONE;
466}
467impl Default for CameraTrackingMode {
468    fn default() -> Self {
469        Self::DEFAULT
470    }
471}
472#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
473#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
474#[cfg_attr(feature = "serde", serde(tag = "type"))]
475#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
476#[repr(u32)]
477#[doc = "Camera tracking status flags"]
478pub enum CameraTrackingStatusFlags {
479    #[doc = "Camera is not tracking"]
480    CAMERA_TRACKING_STATUS_FLAGS_IDLE = 0,
481    #[doc = "Camera is tracking"]
482    CAMERA_TRACKING_STATUS_FLAGS_ACTIVE = 1,
483    #[doc = "Camera tracking in error state"]
484    CAMERA_TRACKING_STATUS_FLAGS_ERROR = 2,
485}
486impl CameraTrackingStatusFlags {
487    pub const DEFAULT: Self = Self::CAMERA_TRACKING_STATUS_FLAGS_IDLE;
488}
489impl Default for CameraTrackingStatusFlags {
490    fn default() -> Self {
491        Self::DEFAULT
492    }
493}
494bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Camera tracking target data (shows where tracked target is within image)"] pub struct CameraTrackingTargetData : u8 { # [doc = "Target data embedded in image data (proprietary)"] const CAMERA_TRACKING_TARGET_DATA_EMBEDDED = 1 ; # [doc = "Target data rendered in image"] const CAMERA_TRACKING_TARGET_DATA_RENDERED = 2 ; # [doc = "Target data within status message (Point or Rectangle)"] const CAMERA_TRACKING_TARGET_DATA_IN_STATUS = 4 ; } }
495impl CameraTrackingTargetData {
496    pub const DEFAULT: Self = Self::CAMERA_TRACKING_TARGET_DATA_EMBEDDED;
497}
498impl Default for CameraTrackingTargetData {
499    fn default() -> Self {
500        Self::DEFAULT
501    }
502}
503#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
505#[cfg_attr(feature = "serde", serde(tag = "type"))]
506#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
507#[repr(u32)]
508#[doc = "Zoom types for MAV_CMD_SET_CAMERA_ZOOM"]
509pub enum CameraZoomType {
510    #[doc = "Zoom one step increment (-1 for wide, 1 for tele)"]
511    ZOOM_TYPE_STEP = 0,
512    #[doc = "Continuous normalized zoom in/out rate until stopped. Range -1..1, negative: wide, positive: narrow/tele, 0 to stop zooming. Other values should be clipped to the range."]
513    ZOOM_TYPE_CONTINUOUS = 1,
514    #[doc = "Zoom value as proportion of full camera range (a percentage value between 0.0 and 100.0)"]
515    ZOOM_TYPE_RANGE = 2,
516    #[doc = "Zoom value/variable focal length in millimetres. Note that there is no message to get the valid zoom range of the camera, so this can type can only be used for cameras where the zoom range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)"]
517    ZOOM_TYPE_FOCAL_LENGTH = 3,
518    #[doc = "Zoom value as horizontal field of view in degrees."]
519    ZOOM_TYPE_HORIZONTAL_FOV = 4,
520}
521impl CameraZoomType {
522    pub const DEFAULT: Self = Self::ZOOM_TYPE_STEP;
523}
524impl Default for CameraZoomType {
525    fn default() -> Self {
526        Self::DEFAULT
527    }
528}
529#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
531#[cfg_attr(feature = "serde", serde(tag = "type"))]
532#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
533#[repr(u32)]
534pub enum CanFilterOp {
535    CAN_FILTER_REPLACE = 0,
536    CAN_FILTER_ADD = 1,
537    CAN_FILTER_REMOVE = 2,
538}
539impl CanFilterOp {
540    pub const DEFAULT: Self = Self::CAN_FILTER_REPLACE;
541}
542impl Default for CanFilterOp {
543    fn default() -> Self {
544        Self::DEFAULT
545    }
546}
547#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
549#[cfg_attr(feature = "serde", serde(tag = "type"))]
550#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
551#[repr(u32)]
552#[doc = "Possible responses from a CELLULAR_CONFIG message."]
553pub enum CellularConfigResponse {
554    #[doc = "Changes accepted."]
555    CELLULAR_CONFIG_RESPONSE_ACCEPTED = 0,
556    #[doc = "Invalid APN."]
557    CELLULAR_CONFIG_RESPONSE_APN_ERROR = 1,
558    #[doc = "Invalid PIN."]
559    CELLULAR_CONFIG_RESPONSE_PIN_ERROR = 2,
560    #[doc = "Changes rejected."]
561    CELLULAR_CONFIG_RESPONSE_REJECTED = 3,
562    #[doc = "PUK is required to unblock SIM card."]
563    CELLULAR_CONFIG_BLOCKED_PUK_REQUIRED = 4,
564}
565impl CellularConfigResponse {
566    pub const DEFAULT: Self = Self::CELLULAR_CONFIG_RESPONSE_ACCEPTED;
567}
568impl Default for CellularConfigResponse {
569    fn default() -> Self {
570        Self::DEFAULT
571    }
572}
573#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
574#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
575#[cfg_attr(feature = "serde", serde(tag = "type"))]
576#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
577#[repr(u32)]
578#[doc = "These flags are used to diagnose the failure state of CELLULAR_STATUS"]
579pub enum CellularNetworkFailedReason {
580    #[doc = "No error"]
581    CELLULAR_NETWORK_FAILED_REASON_NONE = 0,
582    #[doc = "Error state is unknown"]
583    CELLULAR_NETWORK_FAILED_REASON_UNKNOWN = 1,
584    #[doc = "SIM is required for the modem but missing"]
585    CELLULAR_NETWORK_FAILED_REASON_SIM_MISSING = 2,
586    #[doc = "SIM is available, but not usable for connection"]
587    CELLULAR_NETWORK_FAILED_REASON_SIM_ERROR = 3,
588}
589impl CellularNetworkFailedReason {
590    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_FAILED_REASON_NONE;
591}
592impl Default for CellularNetworkFailedReason {
593    fn default() -> Self {
594        Self::DEFAULT
595    }
596}
597#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
598#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
599#[cfg_attr(feature = "serde", serde(tag = "type"))]
600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
601#[repr(u32)]
602#[doc = "Cellular network radio type"]
603pub enum CellularNetworkRadioType {
604    CELLULAR_NETWORK_RADIO_TYPE_NONE = 0,
605    CELLULAR_NETWORK_RADIO_TYPE_GSM = 1,
606    CELLULAR_NETWORK_RADIO_TYPE_CDMA = 2,
607    CELLULAR_NETWORK_RADIO_TYPE_WCDMA = 3,
608    CELLULAR_NETWORK_RADIO_TYPE_LTE = 4,
609}
610impl CellularNetworkRadioType {
611    pub const DEFAULT: Self = Self::CELLULAR_NETWORK_RADIO_TYPE_NONE;
612}
613impl Default for CellularNetworkRadioType {
614    fn default() -> Self {
615        Self::DEFAULT
616    }
617}
618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
620#[cfg_attr(feature = "serde", serde(tag = "type"))]
621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
622#[repr(u32)]
623#[doc = "These flags encode the cellular network status"]
624pub enum CellularStatusFlag {
625    #[doc = "State unknown or not reportable."]
626    CELLULAR_STATUS_FLAG_UNKNOWN = 0,
627    #[doc = "Modem is unusable"]
628    CELLULAR_STATUS_FLAG_FAILED = 1,
629    #[doc = "Modem is being initialized"]
630    CELLULAR_STATUS_FLAG_INITIALIZING = 2,
631    #[doc = "Modem is locked"]
632    CELLULAR_STATUS_FLAG_LOCKED = 3,
633    #[doc = "Modem is not enabled and is powered down"]
634    CELLULAR_STATUS_FLAG_DISABLED = 4,
635    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_DISABLED state"]
636    CELLULAR_STATUS_FLAG_DISABLING = 5,
637    #[doc = "Modem is currently transitioning to the CELLULAR_STATUS_FLAG_ENABLED state"]
638    CELLULAR_STATUS_FLAG_ENABLING = 6,
639    #[doc = "Modem is enabled and powered on but not registered with a network provider and not available for data connections"]
640    CELLULAR_STATUS_FLAG_ENABLED = 7,
641    #[doc = "Modem is searching for a network provider to register"]
642    CELLULAR_STATUS_FLAG_SEARCHING = 8,
643    #[doc = "Modem is registered with a network provider, and data connections and messaging may be available for use"]
644    CELLULAR_STATUS_FLAG_REGISTERED = 9,
645    #[doc = "Modem is disconnecting and deactivating the last active packet data bearer. This state will not be entered if more than one packet data bearer is active and one of the active bearers is deactivated"]
646    CELLULAR_STATUS_FLAG_DISCONNECTING = 10,
647    #[doc = "Modem is activating and connecting the first packet data bearer. Subsequent bearer activations when another bearer is already active do not cause this state to be entered"]
648    CELLULAR_STATUS_FLAG_CONNECTING = 11,
649    #[doc = "One or more packet data bearers is active and connected"]
650    CELLULAR_STATUS_FLAG_CONNECTED = 12,
651}
652impl CellularStatusFlag {
653    pub const DEFAULT: Self = Self::CELLULAR_STATUS_FLAG_UNKNOWN;
654}
655impl Default for CellularStatusFlag {
656    fn default() -> Self {
657        Self::DEFAULT
658    }
659}
660#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
662#[cfg_attr(feature = "serde", serde(tag = "type"))]
663#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
664#[repr(u32)]
665#[doc = "Supported component metadata types. These are used in the \"general\" metadata file returned by COMPONENT_METADATA to provide information about supported metadata types. The types are not used directly in MAVLink messages."]
666pub enum CompMetadataType {
667    #[doc = "General information about the component. General metadata includes information about other metadata types supported by the component. Files of this type must be supported, and must be downloadable from vehicle using a MAVLink FTP URI."]
668    COMP_METADATA_TYPE_GENERAL = 0,
669    #[doc = "Parameter meta data."]
670    COMP_METADATA_TYPE_PARAMETER = 1,
671    #[doc = "Meta data that specifies which commands and command parameters the vehicle supports. (WIP)"]
672    COMP_METADATA_TYPE_COMMANDS = 2,
673    #[doc = "Meta data that specifies external non-MAVLink peripherals."]
674    COMP_METADATA_TYPE_PERIPHERALS = 3,
675    #[doc = "Meta data for the events interface."]
676    COMP_METADATA_TYPE_EVENTS = 4,
677    #[doc = "Meta data for actuator configuration (motors, servos and vehicle geometry) and testing."]
678    COMP_METADATA_TYPE_ACTUATORS = 5,
679}
680impl CompMetadataType {
681    pub const DEFAULT: Self = Self::COMP_METADATA_TYPE_GENERAL;
682}
683impl Default for CompMetadataType {
684    fn default() -> Self {
685        Self::DEFAULT
686    }
687}
688#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
689#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
690#[cfg_attr(feature = "serde", serde(tag = "type"))]
691#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
692#[repr(u32)]
693#[doc = "Indicates the ESC connection type."]
694pub enum EscConnectionType {
695    #[doc = "Traditional PPM ESC."]
696    ESC_CONNECTION_TYPE_PPM = 0,
697    #[doc = "Serial Bus connected ESC."]
698    ESC_CONNECTION_TYPE_SERIAL = 1,
699    #[doc = "One Shot PPM ESC."]
700    ESC_CONNECTION_TYPE_ONESHOT = 2,
701    #[doc = "I2C ESC."]
702    ESC_CONNECTION_TYPE_I2C = 3,
703    #[doc = "CAN-Bus ESC."]
704    ESC_CONNECTION_TYPE_CAN = 4,
705    #[doc = "DShot ESC."]
706    ESC_CONNECTION_TYPE_DSHOT = 5,
707}
708impl EscConnectionType {
709    pub const DEFAULT: Self = Self::ESC_CONNECTION_TYPE_PPM;
710}
711impl Default for EscConnectionType {
712    fn default() -> Self {
713        Self::DEFAULT
714    }
715}
716bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report ESC failures."] pub struct EscFailureFlags : u16 { # [doc = "Over current failure."] const ESC_FAILURE_OVER_CURRENT = 1 ; # [doc = "Over voltage failure."] const ESC_FAILURE_OVER_VOLTAGE = 2 ; # [doc = "Over temperature failure."] const ESC_FAILURE_OVER_TEMPERATURE = 4 ; # [doc = "Over RPM failure."] const ESC_FAILURE_OVER_RPM = 8 ; # [doc = "Inconsistent command failure i.e. out of bounds."] const ESC_FAILURE_INCONSISTENT_CMD = 16 ; # [doc = "Motor stuck failure."] const ESC_FAILURE_MOTOR_STUCK = 32 ; # [doc = "Generic ESC failure."] const ESC_FAILURE_GENERIC = 64 ; } }
717impl EscFailureFlags {
718    pub const DEFAULT: Self = Self::ESC_FAILURE_OVER_CURRENT;
719}
720impl Default for EscFailureFlags {
721    fn default() -> Self {
722        Self::DEFAULT
723    }
724}
725bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in ESTIMATOR_STATUS message"] pub struct EstimatorStatusFlags : u16 { # [doc = "True if the attitude estimate is good"] const ESTIMATOR_ATTITUDE = 1 ; # [doc = "True if the horizontal velocity estimate is good"] const ESTIMATOR_VELOCITY_HORIZ = 2 ; # [doc = "True if the  vertical velocity estimate is good"] const ESTIMATOR_VELOCITY_VERT = 4 ; # [doc = "True if the horizontal position (relative) estimate is good"] const ESTIMATOR_POS_HORIZ_REL = 8 ; # [doc = "True if the horizontal position (absolute) estimate is good"] const ESTIMATOR_POS_HORIZ_ABS = 16 ; # [doc = "True if the vertical position (absolute) estimate is good"] const ESTIMATOR_POS_VERT_ABS = 32 ; # [doc = "True if the vertical position (above ground) estimate is good"] const ESTIMATOR_POS_VERT_AGL = 64 ; # [doc = "True if the EKF is in a constant position mode and is not using external measurements (eg GPS or optical flow)"] const ESTIMATOR_CONST_POS_MODE = 128 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (relative) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_REL = 256 ; # [doc = "True if the EKF has sufficient data to enter a mode that will provide a (absolute) position estimate"] const ESTIMATOR_PRED_POS_HORIZ_ABS = 512 ; # [doc = "True if the EKF has detected a GPS glitch"] const ESTIMATOR_GPS_GLITCH = 1024 ; # [doc = "True if the EKF has detected bad accelerometer data"] const ESTIMATOR_ACCEL_ERROR = 2048 ; } }
726impl EstimatorStatusFlags {
727    pub const DEFAULT: Self = Self::ESTIMATOR_ATTITUDE;
728}
729impl Default for EstimatorStatusFlags {
730    fn default() -> Self {
731        Self::DEFAULT
732    }
733}
734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
736#[cfg_attr(feature = "serde", serde(tag = "type"))]
737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
738#[repr(u32)]
739#[doc = "List of possible failure type to inject."]
740pub enum FailureType {
741    #[doc = "No failure injected, used to reset a previous failure."]
742    FAILURE_TYPE_OK = 0,
743    #[doc = "Sets unit off, so completely non-responsive."]
744    FAILURE_TYPE_OFF = 1,
745    #[doc = "Unit is stuck e.g. keeps reporting the same value."]
746    FAILURE_TYPE_STUCK = 2,
747    #[doc = "Unit is reporting complete garbage."]
748    FAILURE_TYPE_GARBAGE = 3,
749    #[doc = "Unit is consistently wrong."]
750    FAILURE_TYPE_WRONG = 4,
751    #[doc = "Unit is slow, so e.g. reporting at slower than expected rate."]
752    FAILURE_TYPE_SLOW = 5,
753    #[doc = "Data of unit is delayed in time."]
754    FAILURE_TYPE_DELAYED = 6,
755    #[doc = "Unit is sometimes working, sometimes not."]
756    FAILURE_TYPE_INTERMITTENT = 7,
757}
758impl FailureType {
759    pub const DEFAULT: Self = Self::FAILURE_TYPE_OK;
760}
761impl Default for FailureType {
762    fn default() -> Self {
763        Self::DEFAULT
764    }
765}
766#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
767#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
768#[cfg_attr(feature = "serde", serde(tag = "type"))]
769#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
770#[repr(u32)]
771#[doc = "List of possible units where failures can be injected."]
772pub enum FailureUnit {
773    FAILURE_UNIT_SENSOR_GYRO = 0,
774    FAILURE_UNIT_SENSOR_ACCEL = 1,
775    FAILURE_UNIT_SENSOR_MAG = 2,
776    FAILURE_UNIT_SENSOR_BARO = 3,
777    FAILURE_UNIT_SENSOR_GPS = 4,
778    FAILURE_UNIT_SENSOR_OPTICAL_FLOW = 5,
779    FAILURE_UNIT_SENSOR_VIO = 6,
780    FAILURE_UNIT_SENSOR_DISTANCE_SENSOR = 7,
781    FAILURE_UNIT_SENSOR_AIRSPEED = 8,
782    FAILURE_UNIT_SYSTEM_BATTERY = 100,
783    FAILURE_UNIT_SYSTEM_MOTOR = 101,
784    FAILURE_UNIT_SYSTEM_SERVO = 102,
785    FAILURE_UNIT_SYSTEM_AVOIDANCE = 103,
786    FAILURE_UNIT_SYSTEM_RC_SIGNAL = 104,
787    FAILURE_UNIT_SYSTEM_MAVLINK_SIGNAL = 105,
788}
789impl FailureUnit {
790    pub const DEFAULT: Self = Self::FAILURE_UNIT_SENSOR_GYRO;
791}
792impl Default for FailureUnit {
793    fn default() -> Self {
794        Self::DEFAULT
795    }
796}
797#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
799#[cfg_attr(feature = "serde", serde(tag = "type"))]
800#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
801#[repr(u32)]
802pub enum FenceBreach {
803    #[doc = "No last fence breach"]
804    FENCE_BREACH_NONE = 0,
805    #[doc = "Breached minimum altitude"]
806    FENCE_BREACH_MINALT = 1,
807    #[doc = "Breached maximum altitude"]
808    FENCE_BREACH_MAXALT = 2,
809    #[doc = "Breached fence boundary"]
810    FENCE_BREACH_BOUNDARY = 3,
811}
812impl FenceBreach {
813    pub const DEFAULT: Self = Self::FENCE_BREACH_NONE;
814}
815impl Default for FenceBreach {
816    fn default() -> Self {
817        Self::DEFAULT
818    }
819}
820#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
821#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
822#[cfg_attr(feature = "serde", serde(tag = "type"))]
823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
824#[repr(u32)]
825#[doc = "Actions being taken to mitigate/prevent fence breach"]
826pub enum FenceMitigate {
827    #[doc = "Unknown"]
828    FENCE_MITIGATE_UNKNOWN = 0,
829    #[doc = "No actions being taken"]
830    FENCE_MITIGATE_NONE = 1,
831    #[doc = "Velocity limiting active to prevent breach"]
832    FENCE_MITIGATE_VEL_LIMIT = 2,
833}
834impl FenceMitigate {
835    pub const DEFAULT: Self = Self::FENCE_MITIGATE_UNKNOWN;
836}
837impl Default for FenceMitigate {
838    fn default() -> Self {
839        Self::DEFAULT
840    }
841}
842#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
843#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
844#[cfg_attr(feature = "serde", serde(tag = "type"))]
845#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
846#[repr(u32)]
847#[doc = "Fence types to enable or disable when using MAV_CMD_DO_FENCE_ENABLE.         Note that at least one of these flags must be set in MAV_CMD_DO_FENCE_ENABLE.param2.         If none are set, the flight stack will ignore the field and enable/disable its default set of fences (usually all of them)."]
848pub enum FenceType {
849    #[doc = "Maximum altitude fence"]
850    FENCE_TYPE_ALT_MAX = 1,
851    #[doc = "Circle fence"]
852    FENCE_TYPE_CIRCLE = 2,
853    #[doc = "Polygon fence"]
854    FENCE_TYPE_POLYGON = 4,
855    #[doc = "Minimum altitude fence"]
856    FENCE_TYPE_ALT_MIN = 8,
857}
858impl FenceType {
859    pub const DEFAULT: Self = Self::FENCE_TYPE_ALT_MAX;
860}
861impl Default for FenceType {
862    fn default() -> Self {
863        Self::DEFAULT
864    }
865}
866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
868#[cfg_attr(feature = "serde", serde(tag = "type"))]
869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
870#[repr(u32)]
871#[doc = "These values define the type of firmware release.  These values indicate the first version or release of this type.  For example the first alpha release would be 64, the second would be 65."]
872pub enum FirmwareVersionType {
873    #[doc = "development release"]
874    FIRMWARE_VERSION_TYPE_DEV = 0,
875    #[doc = "alpha release"]
876    FIRMWARE_VERSION_TYPE_ALPHA = 64,
877    #[doc = "beta release"]
878    FIRMWARE_VERSION_TYPE_BETA = 128,
879    #[doc = "release candidate"]
880    FIRMWARE_VERSION_TYPE_RC = 192,
881    #[doc = "official stable release"]
882    FIRMWARE_VERSION_TYPE_OFFICIAL = 255,
883}
884impl FirmwareVersionType {
885    pub const DEFAULT: Self = Self::FIRMWARE_VERSION_TYPE_DEV;
886}
887impl Default for FirmwareVersionType {
888    fn default() -> Self {
889        Self::DEFAULT
890    }
891}
892bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) capability flags (bitmap)."] pub struct GimbalDeviceCapFlags : u16 { # [doc = "Gimbal device supports a retracted position."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Gimbal device supports a horizontal, forward looking position, stabilized."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Gimbal device supports rotating around roll axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Gimbal device supports to follow a roll angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Gimbal device supports locking to a roll angle (generally that's the default with roll stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Gimbal device supports rotating around pitch axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Gimbal device supports to follow a pitch angle relative to the vehicle."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Gimbal device supports locking to a pitch angle (generally that's the default with pitch stabilized)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Gimbal device supports rotating around yaw axis."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Gimbal device supports to follow a yaw angle relative to the vehicle (generally that's the default)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Gimbal device supports locking to an absolute heading, i.e., yaw angle relative to North (earth frame, often this is an option available)."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Gimbal device supports yawing/panning infinitely (e.g. using slip disk)."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Gimbal device supports yaw angles and angular velocities relative to North (earth frame). This usually requires support by an autopilot via AUTOPILOT_STATE_FOR_GIMBAL_DEVICE. Support can go on and off during runtime, which is reported by the flag GIMBAL_DEVICE_FLAGS_CAN_ACCEPT_YAW_IN_EARTH_FRAME."] const GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Gimbal device supports radio control inputs as an alternative input for controlling the gimbal orientation."] const GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; } }
893impl GimbalDeviceCapFlags {
894    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT;
895}
896impl Default for GimbalDeviceCapFlags {
897    fn default() -> Self {
898        Self::DEFAULT
899    }
900}
901bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal device (low level) error flags (bitmap, 0 means no error)"] pub struct GimbalDeviceErrorFlags : u32 { # [doc = "Gimbal device is limited by hardware roll limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT = 1 ; # [doc = "Gimbal device is limited by hardware pitch limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_PITCH_LIMIT = 2 ; # [doc = "Gimbal device is limited by hardware yaw limit."] const GIMBAL_DEVICE_ERROR_FLAGS_AT_YAW_LIMIT = 4 ; # [doc = "There is an error with the gimbal encoders."] const GIMBAL_DEVICE_ERROR_FLAGS_ENCODER_ERROR = 8 ; # [doc = "There is an error with the gimbal power source."] const GIMBAL_DEVICE_ERROR_FLAGS_POWER_ERROR = 16 ; # [doc = "There is an error with the gimbal motors."] const GIMBAL_DEVICE_ERROR_FLAGS_MOTOR_ERROR = 32 ; # [doc = "There is an error with the gimbal's software."] const GIMBAL_DEVICE_ERROR_FLAGS_SOFTWARE_ERROR = 64 ; # [doc = "There is an error with the gimbal's communication."] const GIMBAL_DEVICE_ERROR_FLAGS_COMMS_ERROR = 128 ; # [doc = "Gimbal device is currently calibrating."] const GIMBAL_DEVICE_ERROR_FLAGS_CALIBRATION_RUNNING = 256 ; # [doc = "Gimbal device is not assigned to a gimbal manager."] const GIMBAL_DEVICE_ERROR_FLAGS_NO_MANAGER = 512 ; } }
902impl GimbalDeviceErrorFlags {
903    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_ERROR_FLAGS_AT_ROLL_LIMIT;
904}
905impl Default for GimbalDeviceErrorFlags {
906    fn default() -> Self {
907        Self::DEFAULT
908    }
909}
910bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for gimbal device (lower level) operation."] pub struct GimbalDeviceFlags : u16 { # [doc = "Set to retracted safe position (no stabilization), takes precedence over all other flags."] const GIMBAL_DEVICE_FLAGS_RETRACT = 1 ; # [doc = "Set to neutral/default position, taking precedence over all other flags except RETRACT. Neutral is commonly forward-facing and horizontal (roll=pitch=yaw=0) but may be any orientation."] const GIMBAL_DEVICE_FLAGS_NEUTRAL = 2 ; # [doc = "Lock roll angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_ROLL_LOCK = 4 ; # [doc = "Lock pitch angle to absolute angle relative to horizon (not relative to vehicle). This is generally the default with a stabilizing gimbal."] const GIMBAL_DEVICE_FLAGS_PITCH_LOCK = 8 ; # [doc = "Lock yaw angle to absolute angle relative to North (not relative to vehicle). If this flag is set, the yaw angle and z component of angular velocity are relative to North (earth frame, x-axis pointing North), else they are relative to the vehicle heading (vehicle frame, earth frame rotated so that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_LOCK = 16 ; # [doc = "Yaw angle and z component of angular velocity are relative to the vehicle heading (vehicle frame, earth frame rotated such that the x-axis is pointing forward)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Yaw angle and z component of angular velocity are relative to North (earth frame, x-axis is pointing North)."] const GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Gimbal device can accept yaw angle inputs relative to North (earth frame). This flag is only for reporting (attempts to set this flag are ignored)."] const GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "The gimbal orientation is set exclusively by the RC signals feed to the gimbal's radio control inputs. MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE) are ignored."] const GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "The gimbal orientation is determined by combining/mixing the RC signals feed to the gimbal's radio control inputs and the MAVLink messages for setting the gimbal orientation (GIMBAL_DEVICE_SET_ATTITUDE). How these two controls are combined or mixed is not defined by the protocol but is up to the implementation."] const GIMBAL_DEVICE_FLAGS_RC_MIXED = 512 ; } }
911impl GimbalDeviceFlags {
912    pub const DEFAULT: Self = Self::GIMBAL_DEVICE_FLAGS_RETRACT;
913}
914impl Default for GimbalDeviceFlags {
915    fn default() -> Self {
916        Self::DEFAULT
917    }
918}
919bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Gimbal manager high level capability flags (bitmap). The first 16 bits are identical to the GIMBAL_DEVICE_CAP_FLAGS. However, the gimbal manager does not need to copy the flags from the gimbal but can also enhance the capabilities and thus add flags."] pub struct GimbalManagerCapFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RETRACT."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_NEUTRAL."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_AXIS = 4 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_FOLLOW = 8 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_ROLL_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_ROLL_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_AXIS = 32 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_FOLLOW = 64 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_PITCH_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_PITCH_LOCK = 128 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_AXIS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_AXIS = 256 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_FOLLOW."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_FOLLOW = 512 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_YAW_LOCK."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_YAW_LOCK = 1024 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_INFINITE_YAW."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_INFINITE_YAW = 2048 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_CAP_FLAGS_SUPPORTS_YAW_IN_EARTH_FRAME = 4096 ; # [doc = "Based on GIMBAL_DEVICE_CAP_FLAGS_HAS_RC_INPUTS."] const GIMBAL_MANAGER_CAP_FLAGS_HAS_RC_INPUTS = 8192 ; # [doc = "Gimbal manager supports to point to a local position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_LOCAL = 65536 ; # [doc = "Gimbal manager supports to point to a global latitude, longitude, altitude position."] const GIMBAL_MANAGER_CAP_FLAGS_CAN_POINT_LOCATION_GLOBAL = 131072 ; } }
920impl GimbalManagerCapFlags {
921    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_CAP_FLAGS_HAS_RETRACT;
922}
923impl Default for GimbalManagerCapFlags {
924    fn default() -> Self {
925        Self::DEFAULT
926    }
927}
928bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for high level gimbal manager operation The first 16 bits are identical to the GIMBAL_DEVICE_FLAGS."] pub struct GimbalManagerFlags : u32 { # [doc = "Based on GIMBAL_DEVICE_FLAGS_RETRACT."] const GIMBAL_MANAGER_FLAGS_RETRACT = 1 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_NEUTRAL."] const GIMBAL_MANAGER_FLAGS_NEUTRAL = 2 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ROLL_LOCK."] const GIMBAL_MANAGER_FLAGS_ROLL_LOCK = 4 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_PITCH_LOCK."] const GIMBAL_MANAGER_FLAGS_PITCH_LOCK = 8 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_LOCK."] const GIMBAL_MANAGER_FLAGS_YAW_LOCK = 16 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_VEHICLE_FRAME = 32 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_YAW_IN_EARTH_FRAME = 64 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME."] const GIMBAL_MANAGER_FLAGS_ACCEPTS_YAW_IN_EARTH_FRAME = 128 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_EXCLUSIVE."] const GIMBAL_MANAGER_FLAGS_RC_EXCLUSIVE = 256 ; # [doc = "Based on GIMBAL_DEVICE_FLAGS_RC_MIXED."] const GIMBAL_MANAGER_FLAGS_RC_MIXED = 512 ; } }
929impl GimbalManagerFlags {
930    pub const DEFAULT: Self = Self::GIMBAL_MANAGER_FLAGS_RETRACT;
931}
932impl Default for GimbalManagerFlags {
933    fn default() -> Self {
934        Self::DEFAULT
935    }
936}
937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
939#[cfg_attr(feature = "serde", serde(tag = "type"))]
940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
941#[repr(u32)]
942#[doc = "Type of GPS fix"]
943pub enum GpsFixType {
944    #[doc = "No GPS connected"]
945    GPS_FIX_TYPE_NO_GPS = 0,
946    #[doc = "No position information, GPS is connected"]
947    GPS_FIX_TYPE_NO_FIX = 1,
948    #[doc = "2D position"]
949    GPS_FIX_TYPE_2D_FIX = 2,
950    #[doc = "3D position"]
951    GPS_FIX_TYPE_3D_FIX = 3,
952    #[doc = "DGPS/SBAS aided 3D position"]
953    GPS_FIX_TYPE_DGPS = 4,
954    #[doc = "RTK float, 3D position"]
955    GPS_FIX_TYPE_RTK_FLOAT = 5,
956    #[doc = "RTK Fixed, 3D position"]
957    GPS_FIX_TYPE_RTK_FIXED = 6,
958    #[doc = "Static fixed, typically used for base stations"]
959    GPS_FIX_TYPE_STATIC = 7,
960    #[doc = "PPP, 3D position."]
961    GPS_FIX_TYPE_PPP = 8,
962}
963impl GpsFixType {
964    pub const DEFAULT: Self = Self::GPS_FIX_TYPE_NO_GPS;
965}
966impl Default for GpsFixType {
967    fn default() -> Self {
968        Self::DEFAULT
969    }
970}
971bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] pub struct GpsInputIgnoreFlags : u16 { # [doc = "ignore altitude field"] const GPS_INPUT_IGNORE_FLAG_ALT = 1 ; # [doc = "ignore hdop field"] const GPS_INPUT_IGNORE_FLAG_HDOP = 2 ; # [doc = "ignore vdop field"] const GPS_INPUT_IGNORE_FLAG_VDOP = 4 ; # [doc = "ignore horizontal velocity field (vn and ve)"] const GPS_INPUT_IGNORE_FLAG_VEL_HORIZ = 8 ; # [doc = "ignore vertical velocity field (vd)"] const GPS_INPUT_IGNORE_FLAG_VEL_VERT = 16 ; # [doc = "ignore speed accuracy field"] const GPS_INPUT_IGNORE_FLAG_SPEED_ACCURACY = 32 ; # [doc = "ignore horizontal accuracy field"] const GPS_INPUT_IGNORE_FLAG_HORIZONTAL_ACCURACY = 64 ; # [doc = "ignore vertical accuracy field"] const GPS_INPUT_IGNORE_FLAG_VERTICAL_ACCURACY = 128 ; } }
972impl GpsInputIgnoreFlags {
973    pub const DEFAULT: Self = Self::GPS_INPUT_IGNORE_FLAG_ALT;
974}
975impl Default for GpsInputIgnoreFlags {
976    fn default() -> Self {
977        Self::DEFAULT
978    }
979}
980#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
981#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
982#[cfg_attr(feature = "serde", serde(tag = "type"))]
983#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
984#[repr(u32)]
985#[doc = "Gripper actions."]
986pub enum GripperActions {
987    #[doc = "Gripper release cargo."]
988    GRIPPER_ACTION_RELEASE = 0,
989    #[doc = "Gripper grab onto cargo."]
990    GRIPPER_ACTION_GRAB = 1,
991}
992impl GripperActions {
993    pub const DEFAULT: Self = Self::GRIPPER_ACTION_RELEASE;
994}
995impl Default for GripperActions {
996    fn default() -> Self {
997        Self::DEFAULT
998    }
999}
1000bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIGHRES_IMU message indicate which fields have updated since the last message"] pub struct HighresImuUpdatedFlags : u16 { # [doc = "The value in the xacc field has been updated"] const HIGHRES_IMU_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIGHRES_IMU_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated since"] const HIGHRES_IMU_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIGHRES_IMU_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIGHRES_IMU_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIGHRES_IMU_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIGHRES_IMU_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIGHRES_IMU_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIGHRES_IMU_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIGHRES_IMU_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIGHRES_IMU_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIGHRES_IMU_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIGHRES_IMU_UPDATED_TEMPERATURE = 4096 ; } }
1001impl HighresImuUpdatedFlags {
1002    pub const DEFAULT: Self = Self::HIGHRES_IMU_UPDATED_XACC;
1003}
1004impl Default for HighresImuUpdatedFlags {
1005    fn default() -> Self {
1006        Self::DEFAULT
1007    }
1008}
1009bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags used in HIL_ACTUATOR_CONTROLS message."] pub struct HilActuatorControlsFlags : u64 { # [doc = "Simulation is using lockstep"] const HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP = 1 ; } }
1010impl HilActuatorControlsFlags {
1011    pub const DEFAULT: Self = Self::HIL_ACTUATOR_CONTROLS_FLAGS_LOCKSTEP;
1012}
1013impl Default for HilActuatorControlsFlags {
1014    fn default() -> Self {
1015        Self::DEFAULT
1016    }
1017}
1018bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags in the HIL_SENSOR message indicate which fields have updated since the last message"] pub struct HilSensorUpdatedFlags : u32 { # [doc = "The value in the xacc field has been updated"] const HIL_SENSOR_UPDATED_XACC = 1 ; # [doc = "The value in the yacc field has been updated"] const HIL_SENSOR_UPDATED_YACC = 2 ; # [doc = "The value in the zacc field has been updated"] const HIL_SENSOR_UPDATED_ZACC = 4 ; # [doc = "The value in the xgyro field has been updated"] const HIL_SENSOR_UPDATED_XGYRO = 8 ; # [doc = "The value in the ygyro field has been updated"] const HIL_SENSOR_UPDATED_YGYRO = 16 ; # [doc = "The value in the zgyro field has been updated"] const HIL_SENSOR_UPDATED_ZGYRO = 32 ; # [doc = "The value in the xmag field has been updated"] const HIL_SENSOR_UPDATED_XMAG = 64 ; # [doc = "The value in the ymag field has been updated"] const HIL_SENSOR_UPDATED_YMAG = 128 ; # [doc = "The value in the zmag field has been updated"] const HIL_SENSOR_UPDATED_ZMAG = 256 ; # [doc = "The value in the abs_pressure field has been updated"] const HIL_SENSOR_UPDATED_ABS_PRESSURE = 512 ; # [doc = "The value in the diff_pressure field has been updated"] const HIL_SENSOR_UPDATED_DIFF_PRESSURE = 1024 ; # [doc = "The value in the pressure_alt field has been updated"] const HIL_SENSOR_UPDATED_PRESSURE_ALT = 2048 ; # [doc = "The value in the temperature field has been updated"] const HIL_SENSOR_UPDATED_TEMPERATURE = 4096 ; # [doc = "Full reset of attitude/position/velocities/etc was performed in sim (Bit 31)."] const HIL_SENSOR_UPDATED_RESET = 2147483648 ; } }
1019impl HilSensorUpdatedFlags {
1020    pub const DEFAULT: Self = Self::HIL_SENSOR_UPDATED_XACC;
1021}
1022impl Default for HilSensorUpdatedFlags {
1023    fn default() -> Self {
1024        Self::DEFAULT
1025    }
1026}
1027bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report failure cases over the high latency telemetry."] pub struct HlFailureFlag : u16 { # [doc = "GPS failure."] const HL_FAILURE_FLAG_GPS = 1 ; # [doc = "Differential pressure sensor failure."] const HL_FAILURE_FLAG_DIFFERENTIAL_PRESSURE = 2 ; # [doc = "Absolute pressure sensor failure."] const HL_FAILURE_FLAG_ABSOLUTE_PRESSURE = 4 ; # [doc = "Accelerometer sensor failure."] const HL_FAILURE_FLAG_3D_ACCEL = 8 ; # [doc = "Gyroscope sensor failure."] const HL_FAILURE_FLAG_3D_GYRO = 16 ; # [doc = "Magnetometer sensor failure."] const HL_FAILURE_FLAG_3D_MAG = 32 ; # [doc = "Terrain subsystem failure."] const HL_FAILURE_FLAG_TERRAIN = 64 ; # [doc = "Battery failure/critical low battery."] const HL_FAILURE_FLAG_BATTERY = 128 ; # [doc = "RC receiver failure/no RC connection."] const HL_FAILURE_FLAG_RC_RECEIVER = 256 ; # [doc = "Offboard link failure."] const HL_FAILURE_FLAG_OFFBOARD_LINK = 512 ; # [doc = "Engine failure."] const HL_FAILURE_FLAG_ENGINE = 1024 ; # [doc = "Geofence violation."] const HL_FAILURE_FLAG_GEOFENCE = 2048 ; # [doc = "Estimator failure, for example measurement rejection or large variances."] const HL_FAILURE_FLAG_ESTIMATOR = 4096 ; # [doc = "Mission failure."] const HL_FAILURE_FLAG_MISSION = 8192 ; } }
1028impl HlFailureFlag {
1029    pub const DEFAULT: Self = Self::HL_FAILURE_FLAG_GPS;
1030}
1031impl Default for HlFailureFlag {
1032    fn default() -> Self {
1033        Self::DEFAULT
1034    }
1035}
1036bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Illuminator module error flags (bitmap, 0 means no error)"] pub struct IlluminatorErrorFlags : u32 { # [doc = "Illuminator thermal throttling error."] const ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING = 1 ; # [doc = "Illuminator over temperature shutdown error."] const ILLUMINATOR_ERROR_FLAGS_OVER_TEMPERATURE_SHUTDOWN = 2 ; # [doc = "Illuminator thermistor failure."] const ILLUMINATOR_ERROR_FLAGS_THERMISTOR_FAILURE = 4 ; } }
1037impl IlluminatorErrorFlags {
1038    pub const DEFAULT: Self = Self::ILLUMINATOR_ERROR_FLAGS_THERMAL_THROTTLING;
1039}
1040impl Default for IlluminatorErrorFlags {
1041    fn default() -> Self {
1042        Self::DEFAULT
1043    }
1044}
1045#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1046#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1047#[cfg_attr(feature = "serde", serde(tag = "type"))]
1048#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1049#[repr(u32)]
1050#[doc = "Modes of illuminator"]
1051pub enum IlluminatorMode {
1052    #[doc = "Illuminator mode is not specified/unknown"]
1053    ILLUMINATOR_MODE_UNKNOWN = 0,
1054    #[doc = "Illuminator behavior is controlled by MAV_CMD_DO_ILLUMINATOR_CONFIGURE settings"]
1055    ILLUMINATOR_MODE_INTERNAL_CONTROL = 1,
1056    #[doc = "Illuminator behavior is controlled by external factors: e.g. an external hardware signal"]
1057    ILLUMINATOR_MODE_EXTERNAL_SYNC = 2,
1058}
1059impl IlluminatorMode {
1060    pub const DEFAULT: Self = Self::ILLUMINATOR_MODE_UNKNOWN;
1061}
1062impl Default for IlluminatorMode {
1063    fn default() -> Self {
1064        Self::DEFAULT
1065    }
1066}
1067#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1068#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1069#[cfg_attr(feature = "serde", serde(tag = "type"))]
1070#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1071#[repr(u32)]
1072#[doc = "Type of landing target"]
1073pub enum LandingTargetType {
1074    #[doc = "Landing target signaled by light beacon (ex: IR-LOCK)"]
1075    LANDING_TARGET_TYPE_LIGHT_BEACON = 0,
1076    #[doc = "Landing target signaled by radio beacon (ex: ILS, NDB)"]
1077    LANDING_TARGET_TYPE_RADIO_BEACON = 1,
1078    #[doc = "Landing target represented by a fiducial marker (ex: ARTag)"]
1079    LANDING_TARGET_TYPE_VISION_FIDUCIAL = 2,
1080    #[doc = "Landing target represented by a pre-defined visual shape/feature (ex: X-marker, H-marker, square)"]
1081    LANDING_TARGET_TYPE_VISION_OTHER = 3,
1082}
1083impl LandingTargetType {
1084    pub const DEFAULT: Self = Self::LANDING_TARGET_TYPE_LIGHT_BEACON;
1085}
1086impl Default for LandingTargetType {
1087    fn default() -> Self {
1088        Self::DEFAULT
1089    }
1090}
1091#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1092#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1093#[cfg_attr(feature = "serde", serde(tag = "type"))]
1094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1095#[repr(u32)]
1096pub enum MagCalStatus {
1097    MAG_CAL_NOT_STARTED = 0,
1098    MAG_CAL_WAITING_TO_START = 1,
1099    MAG_CAL_RUNNING_STEP_ONE = 2,
1100    MAG_CAL_RUNNING_STEP_TWO = 3,
1101    MAG_CAL_SUCCESS = 4,
1102    MAG_CAL_FAILED = 5,
1103    MAG_CAL_BAD_ORIENTATION = 6,
1104    MAG_CAL_BAD_RADIUS = 7,
1105}
1106impl MagCalStatus {
1107    pub const DEFAULT: Self = Self::MAG_CAL_NOT_STARTED;
1108}
1109impl Default for MagCalStatus {
1110    fn default() -> Self {
1111        Self::DEFAULT
1112    }
1113}
1114#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1115#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1116#[cfg_attr(feature = "serde", serde(tag = "type"))]
1117#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1118#[repr(u32)]
1119pub enum MavArmAuthDeniedReason {
1120    #[doc = "Not a specific reason"]
1121    MAV_ARM_AUTH_DENIED_REASON_GENERIC = 0,
1122    #[doc = "Authorizer will send the error as string to GCS"]
1123    MAV_ARM_AUTH_DENIED_REASON_NONE = 1,
1124    #[doc = "At least one waypoint have a invalid value"]
1125    MAV_ARM_AUTH_DENIED_REASON_INVALID_WAYPOINT = 2,
1126    #[doc = "Timeout in the authorizer process(in case it depends on network)"]
1127    MAV_ARM_AUTH_DENIED_REASON_TIMEOUT = 3,
1128    #[doc = "Airspace of the mission in use by another vehicle, second result parameter can have the waypoint id that caused it to be denied."]
1129    MAV_ARM_AUTH_DENIED_REASON_AIRSPACE_IN_USE = 4,
1130    #[doc = "Weather is not good to fly"]
1131    MAV_ARM_AUTH_DENIED_REASON_BAD_WEATHER = 5,
1132}
1133impl MavArmAuthDeniedReason {
1134    pub const DEFAULT: Self = Self::MAV_ARM_AUTH_DENIED_REASON_GENERIC;
1135}
1136impl Default for MavArmAuthDeniedReason {
1137    fn default() -> Self {
1138        Self::DEFAULT
1139    }
1140}
1141#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1142#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1143#[cfg_attr(feature = "serde", serde(tag = "type"))]
1144#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1145#[repr(u32)]
1146#[doc = "Micro air vehicle / autopilot classes. This identifies the individual model."]
1147pub enum MavAutopilot {
1148    #[doc = "Generic autopilot, full support for everything"]
1149    MAV_AUTOPILOT_GENERIC = 0,
1150    #[doc = "Reserved for future use."]
1151    MAV_AUTOPILOT_RESERVED = 1,
1152    #[doc = "SLUGS autopilot, <http://slugsuav.soe.ucsc.edu>"]
1153    MAV_AUTOPILOT_SLUGS = 2,
1154    #[doc = "ArduPilot - Plane/Copter/Rover/Sub/Tracker, <https://ardupilot.org>"]
1155    MAV_AUTOPILOT_ARDUPILOTMEGA = 3,
1156    #[doc = "OpenPilot, <http://openpilot.org>"]
1157    MAV_AUTOPILOT_OPENPILOT = 4,
1158    #[doc = "Generic autopilot only supporting simple waypoints"]
1159    MAV_AUTOPILOT_GENERIC_WAYPOINTS_ONLY = 5,
1160    #[doc = "Generic autopilot supporting waypoints and other simple navigation commands"]
1161    MAV_AUTOPILOT_GENERIC_WAYPOINTS_AND_SIMPLE_NAVIGATION_ONLY = 6,
1162    #[doc = "Generic autopilot supporting the full mission command set"]
1163    MAV_AUTOPILOT_GENERIC_MISSION_FULL = 7,
1164    #[doc = "No valid autopilot, e.g. a GCS or other MAVLink component"]
1165    MAV_AUTOPILOT_INVALID = 8,
1166    #[doc = "PPZ UAV - <http://nongnu.org/paparazzi>"]
1167    MAV_AUTOPILOT_PPZ = 9,
1168    #[doc = "UAV Dev Board"]
1169    MAV_AUTOPILOT_UDB = 10,
1170    #[doc = "FlexiPilot"]
1171    MAV_AUTOPILOT_FP = 11,
1172    #[doc = "PX4 Autopilot - <http://px4.io/>"]
1173    MAV_AUTOPILOT_PX4 = 12,
1174    #[doc = "SMACCMPilot - <http://smaccmpilot.org>"]
1175    MAV_AUTOPILOT_SMACCMPILOT = 13,
1176    #[doc = "AutoQuad -- <http://autoquad.org>"]
1177    MAV_AUTOPILOT_AUTOQUAD = 14,
1178    #[doc = "Armazila -- <http://armazila.com>"]
1179    MAV_AUTOPILOT_ARMAZILA = 15,
1180    #[doc = "Aerob -- <http://aerob.ru>"]
1181    MAV_AUTOPILOT_AEROB = 16,
1182    #[doc = "ASLUAV autopilot -- <http://www.asl.ethz.ch>"]
1183    MAV_AUTOPILOT_ASLUAV = 17,
1184    #[doc = "SmartAP Autopilot - <http://sky-drones.com>"]
1185    MAV_AUTOPILOT_SMARTAP = 18,
1186    #[doc = "AirRails - <http://uaventure.com>"]
1187    MAV_AUTOPILOT_AIRRAILS = 19,
1188    #[doc = "Fusion Reflex - <https://fusion.engineering>"]
1189    MAV_AUTOPILOT_REFLEX = 20,
1190}
1191impl MavAutopilot {
1192    pub const DEFAULT: Self = Self::MAV_AUTOPILOT_GENERIC;
1193}
1194impl Default for MavAutopilot {
1195    fn default() -> Self {
1196        Self::DEFAULT
1197    }
1198}
1199#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1200#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1201#[cfg_attr(feature = "serde", serde(tag = "type"))]
1202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1203#[repr(u32)]
1204#[doc = "Enumeration for battery charge states."]
1205pub enum MavBatteryChargeState {
1206    #[doc = "Low battery state is not provided"]
1207    MAV_BATTERY_CHARGE_STATE_UNDEFINED = 0,
1208    #[doc = "Battery is not in low state. Normal operation."]
1209    MAV_BATTERY_CHARGE_STATE_OK = 1,
1210    #[doc = "Battery state is low, warn and monitor close."]
1211    MAV_BATTERY_CHARGE_STATE_LOW = 2,
1212    #[doc = "Battery state is critical, return or abort immediately."]
1213    MAV_BATTERY_CHARGE_STATE_CRITICAL = 3,
1214    #[doc = "Battery state is too low for ordinary abort sequence. Perform fastest possible emergency stop to prevent damage."]
1215    MAV_BATTERY_CHARGE_STATE_EMERGENCY = 4,
1216    #[doc = "Battery failed, damage unavoidable. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1217    MAV_BATTERY_CHARGE_STATE_FAILED = 5,
1218    #[doc = "Battery is diagnosed to be defective or an error occurred, usage is discouraged / prohibited. Possible causes (faults) are listed in MAV_BATTERY_FAULT."]
1219    MAV_BATTERY_CHARGE_STATE_UNHEALTHY = 6,
1220    #[doc = "Battery is charging."]
1221    MAV_BATTERY_CHARGE_STATE_CHARGING = 7,
1222}
1223impl MavBatteryChargeState {
1224    pub const DEFAULT: Self = Self::MAV_BATTERY_CHARGE_STATE_UNDEFINED;
1225}
1226impl Default for MavBatteryChargeState {
1227    fn default() -> Self {
1228        Self::DEFAULT
1229    }
1230}
1231bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Smart battery supply status/fault flags (bitmask) for health indication. The battery must also report either MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY if any of these are set."] pub struct MavBatteryFault : u32 { # [doc = "Battery has deep discharged."] const MAV_BATTERY_FAULT_DEEP_DISCHARGE = 1 ; # [doc = "Voltage spikes."] const MAV_BATTERY_FAULT_SPIKES = 2 ; # [doc = "One or more cells have failed. Battery should also report MAV_BATTERY_CHARGE_STATE_FAILE (and should not be used)."] const MAV_BATTERY_FAULT_CELL_FAIL = 4 ; # [doc = "Over-current fault."] const MAV_BATTERY_FAULT_OVER_CURRENT = 8 ; # [doc = "Over-temperature fault."] const MAV_BATTERY_FAULT_OVER_TEMPERATURE = 16 ; # [doc = "Under-temperature fault."] const MAV_BATTERY_FAULT_UNDER_TEMPERATURE = 32 ; # [doc = "Vehicle voltage is not compatible with this battery (batteries on same power rail should have similar voltage)."] const MAV_BATTERY_FAULT_INCOMPATIBLE_VOLTAGE = 64 ; # [doc = "Battery firmware is not compatible with current autopilot firmware."] const MAV_BATTERY_FAULT_INCOMPATIBLE_FIRMWARE = 128 ; # [doc = "Battery is not compatible due to cell configuration (e.g. 5s1p when vehicle requires 6s)."] const BATTERY_FAULT_INCOMPATIBLE_CELLS_CONFIGURATION = 256 ; } }
1232impl MavBatteryFault {
1233    pub const DEFAULT: Self = Self::MAV_BATTERY_FAULT_DEEP_DISCHARGE;
1234}
1235impl Default for MavBatteryFault {
1236    fn default() -> Self {
1237        Self::DEFAULT
1238    }
1239}
1240#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1241#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1242#[cfg_attr(feature = "serde", serde(tag = "type"))]
1243#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1244#[repr(u32)]
1245#[doc = "Enumeration of battery functions"]
1246pub enum MavBatteryFunction {
1247    #[doc = "Battery function is unknown"]
1248    MAV_BATTERY_FUNCTION_UNKNOWN = 0,
1249    #[doc = "Battery supports all flight systems"]
1250    MAV_BATTERY_FUNCTION_ALL = 1,
1251    #[doc = "Battery for the propulsion system"]
1252    MAV_BATTERY_FUNCTION_PROPULSION = 2,
1253    #[doc = "Avionics battery"]
1254    MAV_BATTERY_FUNCTION_AVIONICS = 3,
1255    #[doc = "Payload battery"]
1256    MAV_BATTERY_FUNCTION_PAYLOAD = 4,
1257}
1258impl MavBatteryFunction {
1259    pub const DEFAULT: Self = Self::MAV_BATTERY_FUNCTION_UNKNOWN;
1260}
1261impl Default for MavBatteryFunction {
1262    fn default() -> Self {
1263        Self::DEFAULT
1264    }
1265}
1266#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1267#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1268#[cfg_attr(feature = "serde", serde(tag = "type"))]
1269#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1270#[repr(u32)]
1271#[doc = "Battery mode. Note, the normal operation mode (i.e. when flying) should be reported as MAV_BATTERY_MODE_UNKNOWN to allow message trimming in normal flight."]
1272pub enum MavBatteryMode {
1273    #[doc = "Battery mode not supported/unknown battery mode/normal operation."]
1274    MAV_BATTERY_MODE_UNKNOWN = 0,
1275    #[doc = "Battery is auto discharging (towards storage level)."]
1276    MAV_BATTERY_MODE_AUTO_DISCHARGING = 1,
1277    #[doc = "Battery in hot-swap mode (current limited to prevent spikes that might damage sensitive electrical circuits)."]
1278    MAV_BATTERY_MODE_HOT_SWAP = 2,
1279}
1280impl MavBatteryMode {
1281    pub const DEFAULT: Self = Self::MAV_BATTERY_MODE_UNKNOWN;
1282}
1283impl Default for MavBatteryMode {
1284    fn default() -> Self {
1285        Self::DEFAULT
1286    }
1287}
1288#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1290#[cfg_attr(feature = "serde", serde(tag = "type"))]
1291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1292#[repr(u32)]
1293#[doc = "Enumeration of battery types"]
1294pub enum MavBatteryType {
1295    #[doc = "Not specified."]
1296    MAV_BATTERY_TYPE_UNKNOWN = 0,
1297    #[doc = "Lithium polymer battery"]
1298    MAV_BATTERY_TYPE_LIPO = 1,
1299    #[doc = "Lithium-iron-phosphate battery"]
1300    MAV_BATTERY_TYPE_LIFE = 2,
1301    #[doc = "Lithium-ION battery"]
1302    MAV_BATTERY_TYPE_LION = 3,
1303    #[doc = "Nickel metal hydride battery"]
1304    MAV_BATTERY_TYPE_NIMH = 4,
1305}
1306impl MavBatteryType {
1307    pub const DEFAULT: Self = Self::MAV_BATTERY_TYPE_UNKNOWN;
1308}
1309impl Default for MavBatteryType {
1310    fn default() -> Self {
1311        Self::DEFAULT
1312    }
1313}
1314#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1315#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1316#[cfg_attr(feature = "serde", serde(tag = "type"))]
1317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1318#[repr(u32)]
1319#[doc = "Commands to be executed by the MAV. They can be executed on user request, or as part of a mission script. If the action is used in a mission, the parameter mapping to the waypoint/mission message is as follows: Param 1, Param 2, Param 3, Param 4, X: Param 5, Y:Param 6, Z:Param 7. This command list is similar what ARINC 424 is for commercial aircraft: A data format how to interpret waypoint/mission data. NaN and INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current yaw or latitude rather than a specific value). See <https://mavlink.io/en/guide/xml_schema.html#MAV_CMD> for information about the structure of the MAV_CMD entries"]
1320pub enum MavCmd {
1321    #[doc = "Navigate to waypoint. This is intended for use in missions (for guided commands outside of missions use MAV_CMD_DO_REPOSITION)."]
1322    MAV_CMD_NAV_WAYPOINT = 16,
1323    #[doc = "Loiter around this waypoint an unlimited amount of time"]
1324    MAV_CMD_NAV_LOITER_UNLIM = 17,
1325    #[doc = "Loiter around this waypoint for X turns"]
1326    MAV_CMD_NAV_LOITER_TURNS = 18,
1327    #[doc = "Loiter at the specified latitude, longitude and altitude for a certain amount of time. Multicopter vehicles stop at the point (within a vehicle-specific acceptance radius). Forward-only moving vehicles (e.g. fixed-wing) circle the point with the specified radius/direction. If the Heading Required parameter (2) is non-zero forward moving aircraft will only leave the loiter circle once heading towards the next waypoint."]
1328    MAV_CMD_NAV_LOITER_TIME = 19,
1329    #[doc = "Return to launch location"]
1330    MAV_CMD_NAV_RETURN_TO_LAUNCH = 20,
1331    #[doc = "Land at location."]
1332    MAV_CMD_NAV_LAND = 21,
1333    #[doc = "Takeoff from ground / hand. Vehicles that support multiple takeoff modes (e.g. VTOL quadplane) should take off using the currently configured mode."]
1334    MAV_CMD_NAV_TAKEOFF = 22,
1335    #[doc = "Land at local position (local frame only)"]
1336    MAV_CMD_NAV_LAND_LOCAL = 23,
1337    #[doc = "Takeoff from local position (local frame only)"]
1338    MAV_CMD_NAV_TAKEOFF_LOCAL = 24,
1339    #[doc = "Vehicle following, i.e. this waypoint represents the position of a moving vehicle"]
1340    MAV_CMD_NAV_FOLLOW = 25,
1341    #[doc = "Continue on the current course and climb/descend to specified altitude.  When the altitude is reached continue to the next command (i.e., don't proceed to the next command until the desired altitude is reached."]
1342    MAV_CMD_NAV_CONTINUE_AND_CHANGE_ALT = 30,
1343    #[doc = "Begin loiter at the specified Latitude and Longitude.  If Lat=Lon=0, then loiter at the current position.  Don't consider the navigation command complete (don't leave loiter) until the altitude has been reached. Additionally, if the Heading Required parameter is non-zero the aircraft will not leave the loiter until heading toward the next waypoint."]
1344    MAV_CMD_NAV_LOITER_TO_ALT = 31,
1345    #[doc = "Begin following a target"]
1346    MAV_CMD_DO_FOLLOW = 32,
1347    #[doc = "Reposition the MAV after a follow target command has been sent"]
1348    MAV_CMD_DO_FOLLOW_REPOSITION = 33,
1349    #[doc = "Start orbiting on the circumference of a circle defined by the parameters. Setting values to NaN/INT32_MAX (as appropriate) results in using defaults."]
1350    MAV_CMD_DO_ORBIT = 34,
1351    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1352    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1353    MAV_CMD_NAV_ROI = 80,
1354    #[doc = "Control autonomous path planning on the MAV."]
1355    MAV_CMD_NAV_PATHPLANNING = 81,
1356    #[doc = "Navigate to waypoint using a spline path."]
1357    MAV_CMD_NAV_SPLINE_WAYPOINT = 82,
1358    #[doc = "Takeoff from ground using VTOL mode, and transition to forward flight with specified heading. The command should be ignored by vehicles that dont support both VTOL and fixed-wing flight (multicopters, boats,etc.)."]
1359    MAV_CMD_NAV_VTOL_TAKEOFF = 84,
1360    #[doc = "Land using VTOL mode"]
1361    MAV_CMD_NAV_VTOL_LAND = 85,
1362    #[doc = "hand control over to an external controller"]
1363    MAV_CMD_NAV_GUIDED_ENABLE = 92,
1364    #[doc = "Delay the next navigation command a number of seconds or until a specified time"]
1365    MAV_CMD_NAV_DELAY = 93,
1366    #[doc = "Descend and place payload. Vehicle moves to specified location, descends until it detects a hanging payload has reached the ground, and then releases the payload. If ground is not detected before the reaching the maximum descent value (param1), the command will complete without releasing the payload."]
1367    MAV_CMD_NAV_PAYLOAD_PLACE = 94,
1368    #[doc = "NOP - This command is only used to mark the upper limit of the NAV/ACTION commands in the enumeration"]
1369    MAV_CMD_NAV_LAST = 95,
1370    #[doc = "Delay mission state machine."]
1371    MAV_CMD_CONDITION_DELAY = 112,
1372    #[doc = "Ascend/descend to target altitude at specified rate. Delay mission state machine until desired altitude reached."]
1373    MAV_CMD_CONDITION_CHANGE_ALT = 113,
1374    #[doc = "Delay mission state machine until within desired distance of next NAV point."]
1375    MAV_CMD_CONDITION_DISTANCE = 114,
1376    #[doc = "Reach a certain target angle."]
1377    MAV_CMD_CONDITION_YAW = 115,
1378    #[doc = "NOP - This command is only used to mark the upper limit of the CONDITION commands in the enumeration"]
1379    MAV_CMD_CONDITION_LAST = 159,
1380    #[doc = "Set system mode."]
1381    MAV_CMD_DO_SET_MODE = 176,
1382    #[doc = "Jump to the desired command in the mission list.  Repeat this action only the specified number of times"]
1383    MAV_CMD_DO_JUMP = 177,
1384    #[doc = "Change speed and/or throttle set points. The value persists until it is overridden or there is a mode change"]
1385    MAV_CMD_DO_CHANGE_SPEED = 178,
1386    #[doc = "Sets the home position to either to the current position or a specified position.           The home position is the default position that the system will return to and land on.           The position is set automatically by the system during the takeoff (and may also be set using this command).           Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
1387    MAV_CMD_DO_SET_HOME = 179,
1388    #[deprecated = " See `PARAM_SET` (Deprecated since 2024-04)"]
1389    #[doc = "Set a system parameter.  Caution!  Use of this command requires knowledge of the numeric enumeration value of the parameter."]
1390    MAV_CMD_DO_SET_PARAMETER = 180,
1391    #[doc = "Set a relay to a condition."]
1392    MAV_CMD_DO_SET_RELAY = 181,
1393    #[doc = "Cycle a relay on and off for a desired number of cycles with a desired period."]
1394    MAV_CMD_DO_REPEAT_RELAY = 182,
1395    #[doc = "Set a servo to a desired PWM value."]
1396    MAV_CMD_DO_SET_SERVO = 183,
1397    #[doc = "Cycle a between its nominal setting and a desired PWM for a desired number of cycles with a desired period."]
1398    MAV_CMD_DO_REPEAT_SERVO = 184,
1399    #[doc = "0.5); the ACK should be either MAV_RESULT_FAILED or MAV_RESULT_UNSUPPORTED."]
1400    MAV_CMD_DO_FLIGHTTERMINATION = 185,
1401    #[doc = "Change altitude set point."]
1402    MAV_CMD_DO_CHANGE_ALTITUDE = 186,
1403    #[doc = "Sets actuators (e.g. servos) to a desired value. The actuator numbers are mapped to specific outputs (e.g. on any MAIN or AUX PWM or UAVCAN) using a flight-stack specific mechanism (i.e. a parameter)."]
1404    MAV_CMD_DO_SET_ACTUATOR = 187,
1405    #[doc = "Mission item to specify the start of a failsafe/landing return-path segment (the end of the segment is the next MAV_CMD_DO_LAND_START item).           A vehicle that is using missions for landing (e.g. in a return mode) will join the mission on the closest path of the return-path segment (instead of MAV_CMD_DO_LAND_START or the nearest waypoint).           The main use case is to minimize the failsafe flight path in corridor missions, where the inbound/outbound paths are constrained (by geofences) to the same particular path.           The MAV_CMD_NAV_RETURN_PATH_START would be placed at the start of the return path.           If a failsafe occurs on the outbound path the vehicle will move to the nearest point on the return path (which is parallel for this kind of mission), effectively turning round and following the shortest path to landing.           If a failsafe occurs on the inbound path the vehicle is already on the return segment and will continue to landing.           The Latitude/Longitude/Altitude are optional, and may be set to 0 if not needed.           If specified, the item defines the waypoint at which the return segment starts.           If sent using as a command, the vehicle will perform a mission landing (using the land segment if defined) or reject the command if mission landings are not supported, or no mission landing is defined. When used as a command any position information in the command is ignored."]
1406    MAV_CMD_DO_RETURN_PATH_START = 188,
1407    #[doc = "Mission item to mark the start of a mission landing pattern, or a command to land with a mission landing pattern.          When used in a mission, this is a marker for the start of a sequence of mission items that represent a landing pattern.         It should be followed by a navigation item that defines the first waypoint of the landing sequence.         The start marker positional params are used only for selecting what landing pattern to use if several are defined in the mission (the selected pattern will be the one with the marker position that is closest to the vehicle when a landing is commanded).         If the marker item position has zero-values for latitude, longitude, and altitude, then landing pattern selection is instead based on the position of the first waypoint in the landing sequence.  \t      When sent as a command it triggers a landing using a mission landing pattern. \t      The location parameters are not used in this case, and should be set to 0."]
1408    MAV_CMD_DO_LAND_START = 189,
1409    #[doc = "Mission command to perform a landing from a rally point."]
1410    MAV_CMD_DO_RALLY_LAND = 190,
1411    #[doc = "Mission command to safely abort an autonomous landing."]
1412    MAV_CMD_DO_GO_AROUND = 191,
1413    #[doc = "Reposition the vehicle to a specific WGS84 global position. This command is intended for guided commands (for missions use MAV_CMD_NAV_WAYPOINT instead)."]
1414    MAV_CMD_DO_REPOSITION = 192,
1415    #[doc = "If in a GPS controlled position mode, hold the current position or continue."]
1416    MAV_CMD_DO_PAUSE_CONTINUE = 193,
1417    #[doc = "Set moving direction to forward or reverse."]
1418    MAV_CMD_DO_SET_REVERSE = 194,
1419    #[doc = "Sets the region of interest (ROI) to a location. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal is not to react to this message."]
1420    MAV_CMD_DO_SET_ROI_LOCATION = 195,
1421    #[doc = "Sets the region of interest (ROI) to be toward next waypoint, with optional pitch/roll/yaw offset. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1422    MAV_CMD_DO_SET_ROI_WPNEXT_OFFSET = 196,
1423    #[doc = "Cancels any previous ROI command returning the vehicle/sensors to default flight characteristics. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message. After this command the gimbal manager should go back to manual input if available, and otherwise assume a neutral position."]
1424    MAV_CMD_DO_SET_ROI_NONE = 197,
1425    #[doc = "Mount tracks system with specified system ID. Determination of target vehicle position may be done with GLOBAL_POSITION_INT or any other means. This command can be sent to a gimbal manager but not to a gimbal device. A gimbal device is not to react to this message."]
1426    MAV_CMD_DO_SET_ROI_SYSID = 198,
1427    #[doc = "Control onboard camera system."]
1428    MAV_CMD_DO_CONTROL_VIDEO = 200,
1429    #[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
1430    #[doc = "Sets the region of interest (ROI) for a sensor set or the vehicle itself. This can then be used by the vehicle's control system to control the vehicle attitude and the attitude of various sensors such as cameras."]
1431    MAV_CMD_DO_SET_ROI = 201,
1432    #[doc = "Configure digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1433    MAV_CMD_DO_DIGICAM_CONFIGURE = 202,
1434    #[doc = "Control digital camera. This is a fallback message for systems that have not yet implemented PARAM_EXT_XXX messages and camera definition files (see <https://mavlink.io/en/services/camera_def.html> )."]
1435    MAV_CMD_DO_DIGICAM_CONTROL = 203,
1436    #[deprecated = "This message has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE` (Deprecated since 2020-01)"]
1437    #[doc = "Mission command to configure a camera or antenna mount"]
1438    MAV_CMD_DO_MOUNT_CONFIGURE = 204,
1439    #[deprecated = "This message is ambiguous and inconsistent. It has been superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW and `MAV_CMD_DO_SET_ROI_*` variants. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1440    #[doc = "Mission command to control a camera or antenna mount"]
1441    MAV_CMD_DO_MOUNT_CONTROL = 205,
1442    #[doc = "Mission command to set camera trigger distance for this flight. The camera is triggered each time this distance is exceeded. This command can also be used to set the shutter integration time for the camera."]
1443    MAV_CMD_DO_SET_CAM_TRIGG_DIST = 206,
1444    #[doc = "Enable the geofence.           This can be used in a mission or via the command protocol.           The persistence/lifetime of the setting is undefined.           Depending on flight stack implementation it may persist until superseded, or it may revert to a system default at the end of a mission.           Flight stacks typically reset the setting to system defaults on reboot."]
1445    MAV_CMD_DO_FENCE_ENABLE = 207,
1446    #[doc = "Mission item/command to release a parachute or enable/disable auto release."]
1447    MAV_CMD_DO_PARACHUTE = 208,
1448    #[doc = "Command to perform motor test."]
1449    MAV_CMD_DO_MOTOR_TEST = 209,
1450    #[doc = "Change to/from inverted flight."]
1451    MAV_CMD_DO_INVERTED_FLIGHT = 210,
1452    #[doc = "Mission command to operate a gripper."]
1453    MAV_CMD_DO_GRIPPER = 211,
1454    #[doc = "Enable/disable autotune."]
1455    MAV_CMD_DO_AUTOTUNE_ENABLE = 212,
1456    #[doc = "Sets a desired vehicle turn angle and speed change."]
1457    MAV_CMD_NAV_SET_YAW_SPEED = 213,
1458    #[doc = "Mission command to set camera trigger interval for this flight. If triggering is enabled, the camera is triggered each time this interval expires. This command can also be used to set the shutter integration time for the camera."]
1459    MAV_CMD_DO_SET_CAM_TRIGG_INTERVAL = 214,
1460    #[deprecated = " See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
1461    #[doc = "Mission command to control a camera or antenna mount, using a quaternion as reference."]
1462    MAV_CMD_DO_MOUNT_CONTROL_QUAT = 220,
1463    #[doc = "set id of master controller"]
1464    MAV_CMD_DO_GUIDED_MASTER = 221,
1465    #[doc = "Set limits for external control"]
1466    MAV_CMD_DO_GUIDED_LIMITS = 222,
1467    #[doc = "Control vehicle engine. This is interpreted by the vehicles engine controller to change the target engine state. It is intended for vehicles with internal combustion engines"]
1468    MAV_CMD_DO_ENGINE_CONTROL = 223,
1469    #[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).           If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items. \t  Note that mission jump repeat counters are not reset unless param2 is set (see MAV_CMD_DO_JUMP param2).            This command may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.           If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.           If the system is not in mission mode this command must not trigger a switch to mission mode.            The mission may be \"reset\" using param2.           Resetting sets jump counters to initial values (to reset counters without changing the current mission item set the param1 to `-1`).           Resetting also explicitly changes a mission state of MISSION_STATE_COMPLETE to MISSION_STATE_PAUSED or MISSION_STATE_ACTIVE, potentially allowing it to resume when it is (next) in a mission mode.  \t  The command will ACK with MAV_RESULT_FAILED if the sequence number is out of range (including if there is no mission item)."]
1470    MAV_CMD_DO_SET_MISSION_CURRENT = 224,
1471    #[doc = "NOP - This command is only used to mark the upper limit of the DO commands in the enumeration"]
1472    MAV_CMD_DO_LAST = 240,
1473    #[doc = "Trigger calibration. This command will be only accepted if in pre-flight mode. Except for Temperature Calibration, only one sensor should be set in a single message and all others should be zero."]
1474    MAV_CMD_PREFLIGHT_CALIBRATION = 241,
1475    #[doc = "Set sensor offsets. This command will be only accepted if in pre-flight mode."]
1476    MAV_CMD_PREFLIGHT_SET_SENSOR_OFFSETS = 242,
1477    #[doc = "Trigger UAVCAN configuration (actuator ID assignment and direction mapping). Note that this maps to the legacy UAVCAN v0 function UAVCAN_ENUMERATE, which is intended to be executed just once during initial vehicle configuration (it is not a normal pre-flight command and has been poorly named)."]
1478    MAV_CMD_PREFLIGHT_UAVCAN = 243,
1479    #[doc = "Request storage of different parameter values and logs. This command will be only accepted if in pre-flight mode."]
1480    MAV_CMD_PREFLIGHT_STORAGE = 245,
1481    #[doc = "Request the reboot or shutdown of system components."]
1482    MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN = 246,
1483    #[doc = "Override current mission with command to pause mission, pause mission and move to position, continue/resume mission. When param 1 indicates that the mission is paused (MAV_GOTO_DO_HOLD), param 2 defines whether it holds in place or moves to another position."]
1484    MAV_CMD_OVERRIDE_GOTO = 252,
1485    #[doc = "Mission command to set a Camera Auto Mount Pivoting Oblique Survey (Replaces CAM_TRIGG_DIST for this purpose). The camera is triggered each time this distance is exceeded, then the mount moves to the next position. Params 4~6 set-up the angle limits and number of positions for oblique survey, where mount-enabled vehicles automatically roll the camera between shots to emulate an oblique camera setup (providing an increased HFOV). This command can also be used to set the shutter integration time for the camera."]
1486    MAV_CMD_OBLIQUE_SURVEY = 260,
1487    #[doc = "Enable the specified standard MAVLink mode.           If the specified mode is not supported, the vehicle should ACK with MAV_RESULT_FAILED.           See <https://mavlink.io/en/services/standard_modes.html>"]
1488    MAV_CMD_DO_SET_STANDARD_MODE = 262,
1489    #[doc = "start running a mission"]
1490    MAV_CMD_MISSION_START = 300,
1491    #[doc = "Actuator testing command. This is similar to MAV_CMD_DO_MOTOR_TEST but operates on the level of output functions, i.e. it is possible to test Motor1 independent from which output it is configured on. Autopilots must NACK this command with MAV_RESULT_TEMPORARILY_REJECTED while armed."]
1492    MAV_CMD_ACTUATOR_TEST = 310,
1493    #[doc = "Actuator configuration command."]
1494    MAV_CMD_CONFIGURE_ACTUATOR = 311,
1495    #[doc = "Arms / Disarms a component"]
1496    MAV_CMD_COMPONENT_ARM_DISARM = 400,
1497    #[doc = "Instructs a target system to run pre-arm checks.           This allows preflight checks to be run on demand, which may be useful on systems that normally run them at low rate, or which do not trigger checks when the armable state might have changed.           This command should return MAV_RESULT_ACCEPTED if it will run the checks.           The results of the checks are usually then reported in SYS_STATUS messages (this is system-specific).           The command should return MAV_RESULT_TEMPORARILY_REJECTED if the system is already armed."]
1498    MAV_CMD_RUN_PREARM_CHECKS = 401,
1499    #[doc = "Turns illuminators ON/OFF. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1500    MAV_CMD_ILLUMINATOR_ON_OFF = 405,
1501    #[doc = "Configures illuminator settings. An illuminator is a light source that is used for lighting up dark areas external to the system: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
1502    MAV_CMD_DO_ILLUMINATOR_CONFIGURE = 406,
1503    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1504    #[doc = "Request the home position from the vehicle. \t  The vehicle will ACK the command and then emit the HOME_POSITION message."]
1505    MAV_CMD_GET_HOME_POSITION = 410,
1506    #[doc = "Inject artificial failure for testing purposes. Note that autopilots should implement an additional protection before accepting this command such as a specific param setting."]
1507    MAV_CMD_INJECT_FAILURE = 420,
1508    #[doc = "Starts receiver pairing."]
1509    MAV_CMD_START_RX_PAIR = 500,
1510    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2022-04)"]
1511    #[doc = "Request the interval between messages for a particular MAVLink message ID.           The receiver should ACK the command and then emit its response in a MESSAGE_INTERVAL message."]
1512    MAV_CMD_GET_MESSAGE_INTERVAL = 510,
1513    #[doc = "Set the interval between messages for a particular MAVLink message ID. This interface replaces REQUEST_DATA_STREAM."]
1514    MAV_CMD_SET_MESSAGE_INTERVAL = 511,
1515    #[doc = "Request the target system(s) emit a single instance of a specified message (i.e. a \"one-shot\" version of MAV_CMD_SET_MESSAGE_INTERVAL)."]
1516    MAV_CMD_REQUEST_MESSAGE = 512,
1517    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1518    #[doc = "Request MAVLink protocol version compatibility. All receivers should ACK the command and then emit their capabilities in an PROTOCOL_VERSION message"]
1519    MAV_CMD_REQUEST_PROTOCOL_VERSION = 519,
1520    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1521    #[doc = "Request autopilot capabilities. The receiver should ACK the command and then emit its capabilities in an AUTOPILOT_VERSION message"]
1522    MAV_CMD_REQUEST_AUTOPILOT_CAPABILITIES = 520,
1523    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1524    #[doc = "Request camera information (CAMERA_INFORMATION)."]
1525    MAV_CMD_REQUEST_CAMERA_INFORMATION = 521,
1526    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1527    #[doc = "Request camera settings (CAMERA_SETTINGS)."]
1528    MAV_CMD_REQUEST_CAMERA_SETTINGS = 522,
1529    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1530    #[doc = "Request storage information (STORAGE_INFORMATION). Use the command's target_component to target a specific component's storage."]
1531    MAV_CMD_REQUEST_STORAGE_INFORMATION = 525,
1532    #[doc = "Format a storage medium. Once format is complete, a STORAGE_INFORMATION message is sent. Use the command's target_component to target a specific component's storage."]
1533    MAV_CMD_STORAGE_FORMAT = 526,
1534    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1535    #[doc = "Request camera capture status (CAMERA_CAPTURE_STATUS)"]
1536    MAV_CMD_REQUEST_CAMERA_CAPTURE_STATUS = 527,
1537    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1538    #[doc = "Request flight information (FLIGHT_INFORMATION)"]
1539    MAV_CMD_REQUEST_FLIGHT_INFORMATION = 528,
1540    #[doc = "Reset all camera settings to Factory Default"]
1541    MAV_CMD_RESET_CAMERA_SETTINGS = 529,
1542    #[doc = "Set camera running mode. Use NaN for reserved values. GCS will send a MAV_CMD_REQUEST_VIDEO_STREAM_STATUS command after a mode change if the camera supports video streaming."]
1543    MAV_CMD_SET_CAMERA_MODE = 530,
1544    #[doc = "Set camera zoom. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1545    MAV_CMD_SET_CAMERA_ZOOM = 531,
1546    #[doc = "Set camera focus. Camera must respond with a CAMERA_SETTINGS message (on success)."]
1547    MAV_CMD_SET_CAMERA_FOCUS = 532,
1548    #[doc = "Set that a particular storage is the preferred location for saving photos, videos, and/or other media (e.g. to set that an SD card is used for storing videos).           There can only be one preferred save location for each particular media type: setting a media usage flag will clear/reset that same flag if set on any other storage.           If no flag is set the system should use its default storage.           A target system can choose to always use default storage, in which case it should ACK the command with MAV_RESULT_UNSUPPORTED.           A target system can choose to not allow a particular storage to be set as preferred storage, in which case it should ACK the command with MAV_RESULT_DENIED."]
1549    MAV_CMD_SET_STORAGE_USAGE = 533,
1550    #[doc = "Set camera source. Changes the camera's active sources on cameras with multiple image sensors."]
1551    MAV_CMD_SET_CAMERA_SOURCE = 534,
1552    #[doc = "Tagged jump target. Can be jumped to with MAV_CMD_DO_JUMP_TAG."]
1553    MAV_CMD_JUMP_TAG = 600,
1554    #[doc = "Jump to the matching tag in the mission list. Repeat this action for the specified number of times. A mission should contain a single matching tag for each jump. If this is not the case then a jump to a missing tag should complete the mission, and a jump where there are multiple matching tags should always select the one with the lowest mission sequence number."]
1555    MAV_CMD_DO_JUMP_TAG = 601,
1556    #[doc = "Set gimbal manager pitch/yaw setpoints (low rate command). It is possible to set combinations of the values below. E.g. an angle as well as a desired angular rate can be used to get to this angle at a certain angular rate, or an angular rate only will result in continuous turning. NaN is to be used to signal unset. Note: only the gimbal manager will react to this command - it will be ignored by a gimbal device. Use GIMBAL_MANAGER_SET_PITCHYAW if you need to stream pitch/yaw setpoints at higher rate."]
1557    MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW = 1000,
1558    #[doc = "Gimbal configuration to set which sysid/compid is in primary and secondary control."]
1559    MAV_CMD_DO_GIMBAL_MANAGER_CONFIGURE = 1001,
1560    #[doc = "Start image capture sequence. CAMERA_IMAGE_CAPTURED must be emitted after each capture.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param 1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1561    MAV_CMD_IMAGE_START_CAPTURE = 2000,
1562    #[doc = "Stop image capture sequence.            Param1 (id) may be used to specify the target camera: 0: all cameras, 1 to 6: autopilot-connected cameras, 7-255: MAVLink camera component ID.           It is needed in order to target specific cameras connected to the autopilot, or specific sensors in a multi-sensor camera (neither of which have a distinct MAVLink component ID).           It is also needed to specify the target camera in missions.            When used in a mission, an autopilot should execute the MAV_CMD for a specified local camera (param1 = 1-6), or resend it as a command if it is intended for a MAVLink camera (param1 = 7 - 255), setting the command's target_component as the param1 value (and setting param1 in the command to zero).           If the param1 is 0 the autopilot should do both.            When sent in a command the target MAVLink address is set using target_component.           If addressed specifically to an autopilot: param1 should be used in the same way as it is for missions (though command should NACK with MAV_RESULT_DENIED if a specified local camera does not exist).           If addressed to a MAVLink camera, param1 can be used to address all cameras (0), or to separately address 1 to 7 individual sensors. Other values should be NACKed with MAV_RESULT_DENIED.           If the command is broadcast (target_component is 0) then param 1 should be set to 0 (any other value should be NACKED with MAV_RESULT_DENIED). An autopilot would trigger any local cameras and forward the command to all channels."]
1563    MAV_CMD_IMAGE_STOP_CAPTURE = 2001,
1564    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1565    #[doc = "Re-request a CAMERA_IMAGE_CAPTURED message."]
1566    MAV_CMD_REQUEST_CAMERA_IMAGE_CAPTURE = 2002,
1567    #[doc = "Enable or disable on-board camera triggering system."]
1568    MAV_CMD_DO_TRIGGER_CONTROL = 2003,
1569    #[doc = "If the camera supports point visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_POINT is set), this command allows to initiate the tracking."]
1570    MAV_CMD_CAMERA_TRACK_POINT = 2004,
1571    #[doc = "If the camera supports rectangle visual tracking (CAMERA_CAP_FLAGS_HAS_TRACKING_RECTANGLE is set), this command allows to initiate the tracking."]
1572    MAV_CMD_CAMERA_TRACK_RECTANGLE = 2005,
1573    #[doc = "Stops ongoing tracking."]
1574    MAV_CMD_CAMERA_STOP_TRACKING = 2010,
1575    #[doc = "Starts video capture (recording)."]
1576    MAV_CMD_VIDEO_START_CAPTURE = 2500,
1577    #[doc = "Stop the current video capture (recording)."]
1578    MAV_CMD_VIDEO_STOP_CAPTURE = 2501,
1579    #[doc = "Start video streaming"]
1580    MAV_CMD_VIDEO_START_STREAMING = 2502,
1581    #[doc = "Stop the given video stream"]
1582    MAV_CMD_VIDEO_STOP_STREAMING = 2503,
1583    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1584    #[doc = "Request video stream information (VIDEO_STREAM_INFORMATION)"]
1585    MAV_CMD_REQUEST_VIDEO_STREAM_INFORMATION = 2504,
1586    #[deprecated = " See `MAV_CMD_REQUEST_MESSAGE` (Deprecated since 2019-08)"]
1587    #[doc = "Request video stream status (VIDEO_STREAM_STATUS)"]
1588    MAV_CMD_REQUEST_VIDEO_STREAM_STATUS = 2505,
1589    #[doc = "Request to start streaming logging data over MAVLink (see also LOGGING_DATA message)"]
1590    MAV_CMD_LOGGING_START = 2510,
1591    #[doc = "Request to stop streaming log data over MAVLink"]
1592    MAV_CMD_LOGGING_STOP = 2511,
1593    MAV_CMD_AIRFRAME_CONFIGURATION = 2520,
1594    #[doc = "Request to start/stop transmitting over the high latency telemetry"]
1595    MAV_CMD_CONTROL_HIGH_LATENCY = 2600,
1596    #[doc = "Create a panorama at the current position"]
1597    MAV_CMD_PANORAMA_CREATE = 2800,
1598    #[doc = "Request VTOL transition"]
1599    MAV_CMD_DO_VTOL_TRANSITION = 3000,
1600    #[doc = "Request authorization to arm the vehicle to a external entity, the arm authorizer is responsible to request all data that is needs from the vehicle before authorize or deny the request. \t\tIf approved the COMMAND_ACK message progress field should be set with period of time that this authorization is valid in seconds. \t\tIf the authorization is denied COMMAND_ACK.result_param2 should be set with one of the reasons in ARM_AUTH_DENIED_REASON."]
1601    MAV_CMD_ARM_AUTHORIZATION_REQUEST = 3001,
1602    #[doc = "This command sets the submode to standard guided when vehicle is in guided mode. The vehicle holds position and altitude and the user can input the desired velocities along all three axes."]
1603    MAV_CMD_SET_GUIDED_SUBMODE_STANDARD = 4000,
1604    #[doc = "This command sets submode circle when vehicle is in guided mode. Vehicle flies along a circle facing the center of the circle. The user can input the velocity along the circle and change the radius. If no input is given the vehicle will hold position."]
1605    MAV_CMD_SET_GUIDED_SUBMODE_CIRCLE = 4001,
1606    #[doc = "Delay mission state machine until gate has been reached."]
1607    MAV_CMD_CONDITION_GATE = 4501,
1608    #[doc = "Fence return point (there can only be one such point in a geofence definition). If rally points are supported they should be used instead."]
1609    MAV_CMD_NAV_FENCE_RETURN_POINT = 5000,
1610    #[doc = "Fence vertex for an inclusion polygon (the polygon must not be self-intersecting). The vehicle must stay within this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1611    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_INCLUSION = 5001,
1612    #[doc = "Fence vertex for an exclusion polygon (the polygon must not be self-intersecting). The vehicle must stay outside this area. Minimum of 3 vertices required.           The vertices for a polygon must be sent sequentially, each with param1 set to the total number of vertices in the polygon."]
1613    MAV_CMD_NAV_FENCE_POLYGON_VERTEX_EXCLUSION = 5002,
1614    #[doc = "Circular fence area. The vehicle must stay inside this area."]
1615    MAV_CMD_NAV_FENCE_CIRCLE_INCLUSION = 5003,
1616    #[doc = "Circular fence area. The vehicle must stay outside this area."]
1617    MAV_CMD_NAV_FENCE_CIRCLE_EXCLUSION = 5004,
1618    #[doc = "Rally point. You can have multiple rally points defined."]
1619    MAV_CMD_NAV_RALLY_POINT = 5100,
1620    #[doc = "Commands the vehicle to respond with a sequence of messages UAVCAN_NODE_INFO, one message per every UAVCAN node that is online. Note that some of the response messages can be lost, which the receiver can detect easily by checking whether every received UAVCAN_NODE_STATUS has a matching message UAVCAN_NODE_INFO received earlier; if not, this command should be sent again in order to request re-transmission of the node information messages."]
1621    MAV_CMD_UAVCAN_GET_NODE_INFO = 5200,
1622    #[doc = "Change state of safety switch."]
1623    MAV_CMD_DO_SET_SAFETY_SWITCH_STATE = 5300,
1624    #[doc = "Trigger the start of an ADSB-out IDENT. This should only be used when requested to do so by an Air Traffic Controller in controlled airspace. This starts the IDENT which is then typically held for 18 seconds by the hardware per the Mode A, C, and S transponder spec."]
1625    MAV_CMD_DO_ADSB_OUT_IDENT = 10001,
1626    #[deprecated = "  (Deprecated since 2021-06)"]
1627    #[doc = "Deploy payload on a Lat / Lon / Alt position. This includes the navigation to reach the required release position and velocity."]
1628    MAV_CMD_PAYLOAD_PREPARE_DEPLOY = 30001,
1629    #[deprecated = "  (Deprecated since 2021-06)"]
1630    #[doc = "Control the payload deployment."]
1631    MAV_CMD_PAYLOAD_CONTROL_DEPLOY = 30002,
1632    #[doc = "Magnetometer calibration based on provided known yaw. This allows for fast calibration using WMM field tables in the vehicle, given only the known yaw of the vehicle. If Latitude and longitude are both zero then use the current vehicle location."]
1633    MAV_CMD_FIXED_MAG_CAL_YAW = 42006,
1634    #[doc = "Command to operate winch."]
1635    MAV_CMD_DO_WINCH = 42600,
1636    #[doc = "Provide an external position estimate for use when dead-reckoning. This is meant to be used for occasional position resets that may be provided by a external system such as a remote pilot using landmarks over a video link."]
1637    MAV_CMD_EXTERNAL_POSITION_ESTIMATE = 43003,
1638    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1639    MAV_CMD_WAYPOINT_USER_1 = 31000,
1640    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1641    MAV_CMD_WAYPOINT_USER_2 = 31001,
1642    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1643    MAV_CMD_WAYPOINT_USER_3 = 31002,
1644    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1645    MAV_CMD_WAYPOINT_USER_4 = 31003,
1646    #[doc = "User defined waypoint item. Ground Station will show the Vehicle as flying through this item."]
1647    MAV_CMD_WAYPOINT_USER_5 = 31004,
1648    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1649    MAV_CMD_SPATIAL_USER_1 = 31005,
1650    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1651    MAV_CMD_SPATIAL_USER_2 = 31006,
1652    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1653    MAV_CMD_SPATIAL_USER_3 = 31007,
1654    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1655    MAV_CMD_SPATIAL_USER_4 = 31008,
1656    #[doc = "User defined spatial item. Ground Station will not show the Vehicle as flying through this item. Example: ROI item."]
1657    MAV_CMD_SPATIAL_USER_5 = 31009,
1658    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1659    MAV_CMD_USER_1 = 31010,
1660    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1661    MAV_CMD_USER_2 = 31011,
1662    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1663    MAV_CMD_USER_3 = 31012,
1664    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1665    MAV_CMD_USER_4 = 31013,
1666    #[doc = "User defined command. Ground Station will not show the Vehicle as flying through this item. Example: MAV_CMD_DO_SET_PARAMETER item."]
1667    MAV_CMD_USER_5 = 31014,
1668    #[doc = "Request forwarding of CAN packets from the given CAN bus to this component. CAN Frames are sent using CAN_FRAME and CANFD_FRAME messages"]
1669    MAV_CMD_CAN_FORWARD = 32000,
1670}
1671impl MavCmd {
1672    pub const DEFAULT: Self = Self::MAV_CMD_NAV_WAYPOINT;
1673}
1674impl Default for MavCmd {
1675    fn default() -> Self {
1676        Self::DEFAULT
1677    }
1678}
1679#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1681#[cfg_attr(feature = "serde", serde(tag = "type"))]
1682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1683#[repr(u32)]
1684#[doc = "Possible actions an aircraft can take to avoid a collision."]
1685pub enum MavCollisionAction {
1686    #[doc = "Ignore any potential collisions"]
1687    MAV_COLLISION_ACTION_NONE = 0,
1688    #[doc = "Report potential collision"]
1689    MAV_COLLISION_ACTION_REPORT = 1,
1690    #[doc = "Ascend or Descend to avoid threat"]
1691    MAV_COLLISION_ACTION_ASCEND_OR_DESCEND = 2,
1692    #[doc = "Move horizontally to avoid threat"]
1693    MAV_COLLISION_ACTION_MOVE_HORIZONTALLY = 3,
1694    #[doc = "Aircraft to move perpendicular to the collision's velocity vector"]
1695    MAV_COLLISION_ACTION_MOVE_PERPENDICULAR = 4,
1696    #[doc = "Aircraft to fly directly back to its launch point"]
1697    MAV_COLLISION_ACTION_RTL = 5,
1698    #[doc = "Aircraft to stop in place"]
1699    MAV_COLLISION_ACTION_HOVER = 6,
1700}
1701impl MavCollisionAction {
1702    pub const DEFAULT: Self = Self::MAV_COLLISION_ACTION_NONE;
1703}
1704impl Default for MavCollisionAction {
1705    fn default() -> Self {
1706        Self::DEFAULT
1707    }
1708}
1709#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1711#[cfg_attr(feature = "serde", serde(tag = "type"))]
1712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1713#[repr(u32)]
1714#[doc = "Source of information about this collision."]
1715pub enum MavCollisionSrc {
1716    #[doc = "ID field references ADSB_VEHICLE packets"]
1717    MAV_COLLISION_SRC_ADSB = 0,
1718    #[doc = "ID field references MAVLink SRC ID"]
1719    MAV_COLLISION_SRC_MAVLINK_GPS_GLOBAL_INT = 1,
1720}
1721impl MavCollisionSrc {
1722    pub const DEFAULT: Self = Self::MAV_COLLISION_SRC_ADSB;
1723}
1724impl Default for MavCollisionSrc {
1725    fn default() -> Self {
1726        Self::DEFAULT
1727    }
1728}
1729#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1731#[cfg_attr(feature = "serde", serde(tag = "type"))]
1732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1733#[repr(u32)]
1734#[doc = "Aircraft-rated danger from this threat."]
1735pub enum MavCollisionThreatLevel {
1736    #[doc = "Not a threat"]
1737    MAV_COLLISION_THREAT_LEVEL_NONE = 0,
1738    #[doc = "Craft is mildly concerned about this threat"]
1739    MAV_COLLISION_THREAT_LEVEL_LOW = 1,
1740    #[doc = "Craft is panicking, and may take actions to avoid threat"]
1741    MAV_COLLISION_THREAT_LEVEL_HIGH = 2,
1742}
1743impl MavCollisionThreatLevel {
1744    pub const DEFAULT: Self = Self::MAV_COLLISION_THREAT_LEVEL_NONE;
1745}
1746impl Default for MavCollisionThreatLevel {
1747    fn default() -> Self {
1748        Self::DEFAULT
1749    }
1750}
1751#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
1752#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
1753#[cfg_attr(feature = "serde", serde(tag = "type"))]
1754#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
1755#[repr(u32)]
1756#[doc = "Component ids (values) for the different types and instances of onboard hardware/software that might make up a MAVLink system (autopilot, cameras, servos, GPS systems, avoidance systems etc.).       Components must use the appropriate ID in their source address when sending messages. Components can also use IDs to determine if they are the intended recipient of an incoming message. The MAV_COMP_ID_ALL value is used to indicate messages that must be processed by all components.       When creating new entries, components that can have multiple instances (e.g. cameras, servos etc.) should be allocated sequential values. An appropriate number of values should be left free after these components to allow the number of instances to be expanded."]
1757pub enum MavComponent {
1758    #[doc = "Target id (target_component) used to broadcast messages to all components of the receiving system. Components should attempt to process messages with this component ID and forward to components on any other interfaces. Note: This is not a valid *source* component id for a message."]
1759    MAV_COMP_ID_ALL = 0,
1760    #[doc = "System flight controller component (\"autopilot\"). Only one autopilot is expected in a particular system."]
1761    MAV_COMP_ID_AUTOPILOT1 = 1,
1762    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1763    MAV_COMP_ID_USER1 = 25,
1764    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1765    MAV_COMP_ID_USER2 = 26,
1766    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1767    MAV_COMP_ID_USER3 = 27,
1768    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1769    MAV_COMP_ID_USER4 = 28,
1770    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1771    MAV_COMP_ID_USER5 = 29,
1772    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1773    MAV_COMP_ID_USER6 = 30,
1774    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1775    MAV_COMP_ID_USER7 = 31,
1776    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1777    MAV_COMP_ID_USER8 = 32,
1778    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1779    MAV_COMP_ID_USER9 = 33,
1780    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1781    MAV_COMP_ID_USER10 = 34,
1782    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1783    MAV_COMP_ID_USER11 = 35,
1784    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1785    MAV_COMP_ID_USER12 = 36,
1786    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1787    MAV_COMP_ID_USER13 = 37,
1788    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1789    MAV_COMP_ID_USER14 = 38,
1790    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1791    MAV_COMP_ID_USER15 = 39,
1792    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1793    MAV_COMP_ID_USER16 = 40,
1794    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1795    MAV_COMP_ID_USER17 = 41,
1796    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1797    MAV_COMP_ID_USER18 = 42,
1798    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1799    MAV_COMP_ID_USER19 = 43,
1800    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1801    MAV_COMP_ID_USER20 = 44,
1802    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1803    MAV_COMP_ID_USER21 = 45,
1804    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1805    MAV_COMP_ID_USER22 = 46,
1806    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1807    MAV_COMP_ID_USER23 = 47,
1808    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1809    MAV_COMP_ID_USER24 = 48,
1810    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1811    MAV_COMP_ID_USER25 = 49,
1812    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1813    MAV_COMP_ID_USER26 = 50,
1814    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1815    MAV_COMP_ID_USER27 = 51,
1816    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1817    MAV_COMP_ID_USER28 = 52,
1818    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1819    MAV_COMP_ID_USER29 = 53,
1820    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1821    MAV_COMP_ID_USER30 = 54,
1822    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1823    MAV_COMP_ID_USER31 = 55,
1824    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1825    MAV_COMP_ID_USER32 = 56,
1826    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1827    MAV_COMP_ID_USER33 = 57,
1828    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1829    MAV_COMP_ID_USER34 = 58,
1830    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1831    MAV_COMP_ID_USER35 = 59,
1832    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1833    MAV_COMP_ID_USER36 = 60,
1834    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1835    MAV_COMP_ID_USER37 = 61,
1836    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1837    MAV_COMP_ID_USER38 = 62,
1838    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1839    MAV_COMP_ID_USER39 = 63,
1840    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1841    MAV_COMP_ID_USER40 = 64,
1842    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1843    MAV_COMP_ID_USER41 = 65,
1844    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1845    MAV_COMP_ID_USER42 = 66,
1846    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1847    MAV_COMP_ID_USER43 = 67,
1848    #[doc = "Telemetry radio (e.g. SiK radio, or other component that emits RADIO_STATUS messages)."]
1849    MAV_COMP_ID_TELEMETRY_RADIO = 68,
1850    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1851    MAV_COMP_ID_USER45 = 69,
1852    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1853    MAV_COMP_ID_USER46 = 70,
1854    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1855    MAV_COMP_ID_USER47 = 71,
1856    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1857    MAV_COMP_ID_USER48 = 72,
1858    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1859    MAV_COMP_ID_USER49 = 73,
1860    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1861    MAV_COMP_ID_USER50 = 74,
1862    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1863    MAV_COMP_ID_USER51 = 75,
1864    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1865    MAV_COMP_ID_USER52 = 76,
1866    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1867    MAV_COMP_ID_USER53 = 77,
1868    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1869    MAV_COMP_ID_USER54 = 78,
1870    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1871    MAV_COMP_ID_USER55 = 79,
1872    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1873    MAV_COMP_ID_USER56 = 80,
1874    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1875    MAV_COMP_ID_USER57 = 81,
1876    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1877    MAV_COMP_ID_USER58 = 82,
1878    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1879    MAV_COMP_ID_USER59 = 83,
1880    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1881    MAV_COMP_ID_USER60 = 84,
1882    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1883    MAV_COMP_ID_USER61 = 85,
1884    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1885    MAV_COMP_ID_USER62 = 86,
1886    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1887    MAV_COMP_ID_USER63 = 87,
1888    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1889    MAV_COMP_ID_USER64 = 88,
1890    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1891    MAV_COMP_ID_USER65 = 89,
1892    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1893    MAV_COMP_ID_USER66 = 90,
1894    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1895    MAV_COMP_ID_USER67 = 91,
1896    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1897    MAV_COMP_ID_USER68 = 92,
1898    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1899    MAV_COMP_ID_USER69 = 93,
1900    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1901    MAV_COMP_ID_USER70 = 94,
1902    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1903    MAV_COMP_ID_USER71 = 95,
1904    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1905    MAV_COMP_ID_USER72 = 96,
1906    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1907    MAV_COMP_ID_USER73 = 97,
1908    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1909    MAV_COMP_ID_USER74 = 98,
1910    #[doc = "Id for a component on privately managed MAVLink network. Can be used for any purpose but may not be published by components outside of the private network."]
1911    MAV_COMP_ID_USER75 = 99,
1912    #[doc = "Camera #1."]
1913    MAV_COMP_ID_CAMERA = 100,
1914    #[doc = "Camera #2."]
1915    MAV_COMP_ID_CAMERA2 = 101,
1916    #[doc = "Camera #3."]
1917    MAV_COMP_ID_CAMERA3 = 102,
1918    #[doc = "Camera #4."]
1919    MAV_COMP_ID_CAMERA4 = 103,
1920    #[doc = "Camera #5."]
1921    MAV_COMP_ID_CAMERA5 = 104,
1922    #[doc = "Camera #6."]
1923    MAV_COMP_ID_CAMERA6 = 105,
1924    #[doc = "Servo #1."]
1925    MAV_COMP_ID_SERVO1 = 140,
1926    #[doc = "Servo #2."]
1927    MAV_COMP_ID_SERVO2 = 141,
1928    #[doc = "Servo #3."]
1929    MAV_COMP_ID_SERVO3 = 142,
1930    #[doc = "Servo #4."]
1931    MAV_COMP_ID_SERVO4 = 143,
1932    #[doc = "Servo #5."]
1933    MAV_COMP_ID_SERVO5 = 144,
1934    #[doc = "Servo #6."]
1935    MAV_COMP_ID_SERVO6 = 145,
1936    #[doc = "Servo #7."]
1937    MAV_COMP_ID_SERVO7 = 146,
1938    #[doc = "Servo #8."]
1939    MAV_COMP_ID_SERVO8 = 147,
1940    #[doc = "Servo #9."]
1941    MAV_COMP_ID_SERVO9 = 148,
1942    #[doc = "Servo #10."]
1943    MAV_COMP_ID_SERVO10 = 149,
1944    #[doc = "Servo #11."]
1945    MAV_COMP_ID_SERVO11 = 150,
1946    #[doc = "Servo #12."]
1947    MAV_COMP_ID_SERVO12 = 151,
1948    #[doc = "Servo #13."]
1949    MAV_COMP_ID_SERVO13 = 152,
1950    #[doc = "Servo #14."]
1951    MAV_COMP_ID_SERVO14 = 153,
1952    #[doc = "Gimbal #1."]
1953    MAV_COMP_ID_GIMBAL = 154,
1954    #[doc = "Logging component."]
1955    MAV_COMP_ID_LOG = 155,
1956    #[doc = "Automatic Dependent Surveillance-Broadcast (ADS-B) component."]
1957    MAV_COMP_ID_ADSB = 156,
1958    #[doc = "On Screen Display (OSD) devices for video links."]
1959    MAV_COMP_ID_OSD = 157,
1960    #[doc = "Generic autopilot peripheral component ID. Meant for devices that do not implement the parameter microservice."]
1961    MAV_COMP_ID_PERIPHERAL = 158,
1962    #[deprecated = "All gimbals should use MAV_COMP_ID_GIMBAL. See `MAV_COMP_ID_GIMBAL` (Deprecated since 2018-11)"]
1963    #[doc = "Gimbal ID for QX1."]
1964    MAV_COMP_ID_QX1_GIMBAL = 159,
1965    #[doc = "FLARM collision alert component."]
1966    MAV_COMP_ID_FLARM = 160,
1967    #[doc = "Parachute component."]
1968    MAV_COMP_ID_PARACHUTE = 161,
1969    #[doc = "Winch component."]
1970    MAV_COMP_ID_WINCH = 169,
1971    #[doc = "Gimbal #2."]
1972    MAV_COMP_ID_GIMBAL2 = 171,
1973    #[doc = "Gimbal #3."]
1974    MAV_COMP_ID_GIMBAL3 = 172,
1975    #[doc = "Gimbal #4"]
1976    MAV_COMP_ID_GIMBAL4 = 173,
1977    #[doc = "Gimbal #5."]
1978    MAV_COMP_ID_GIMBAL5 = 174,
1979    #[doc = "Gimbal #6."]
1980    MAV_COMP_ID_GIMBAL6 = 175,
1981    #[doc = "Battery #1."]
1982    MAV_COMP_ID_BATTERY = 180,
1983    #[doc = "Battery #2."]
1984    MAV_COMP_ID_BATTERY2 = 181,
1985    #[doc = "CAN over MAVLink client."]
1986    MAV_COMP_ID_MAVCAN = 189,
1987    #[doc = "Component that can generate/supply a mission flight plan (e.g. GCS or developer API)."]
1988    MAV_COMP_ID_MISSIONPLANNER = 190,
1989    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1990    MAV_COMP_ID_ONBOARD_COMPUTER = 191,
1991    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1992    MAV_COMP_ID_ONBOARD_COMPUTER2 = 192,
1993    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1994    MAV_COMP_ID_ONBOARD_COMPUTER3 = 193,
1995    #[doc = "Component that lives on the onboard computer (companion computer) and has some generic functionalities, such as settings system parameters and monitoring the status of some processes that don't directly speak mavlink and so on."]
1996    MAV_COMP_ID_ONBOARD_COMPUTER4 = 194,
1997    #[doc = "Component that finds an optimal path between points based on a certain constraint (e.g. minimum snap, shortest path, cost, etc.)."]
1998    MAV_COMP_ID_PATHPLANNER = 195,
1999    #[doc = "Component that plans a collision free path between two points."]
2000    MAV_COMP_ID_OBSTACLE_AVOIDANCE = 196,
2001    #[doc = "Component that provides position estimates using VIO techniques."]
2002    MAV_COMP_ID_VISUAL_INERTIAL_ODOMETRY = 197,
2003    #[doc = "Component that manages pairing of vehicle and GCS."]
2004    MAV_COMP_ID_PAIRING_MANAGER = 198,
2005    #[doc = "Inertial Measurement Unit (IMU) #1."]
2006    MAV_COMP_ID_IMU = 200,
2007    #[doc = "Inertial Measurement Unit (IMU) #2."]
2008    MAV_COMP_ID_IMU_2 = 201,
2009    #[doc = "Inertial Measurement Unit (IMU) #3."]
2010    MAV_COMP_ID_IMU_3 = 202,
2011    #[doc = "GPS #1."]
2012    MAV_COMP_ID_GPS = 220,
2013    #[doc = "GPS #2."]
2014    MAV_COMP_ID_GPS2 = 221,
2015    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2016    MAV_COMP_ID_ODID_TXRX_1 = 236,
2017    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2018    MAV_COMP_ID_ODID_TXRX_2 = 237,
2019    #[doc = "Open Drone ID transmitter/receiver (Bluetooth/WiFi/Internet)."]
2020    MAV_COMP_ID_ODID_TXRX_3 = 238,
2021    #[doc = "Component to bridge MAVLink to UDP (i.e. from a UART)."]
2022    MAV_COMP_ID_UDP_BRIDGE = 240,
2023    #[doc = "Component to bridge to UART (i.e. from UDP)."]
2024    MAV_COMP_ID_UART_BRIDGE = 241,
2025    #[doc = "Component handling TUNNEL messages (e.g. vendor specific GUI of a component)."]
2026    MAV_COMP_ID_TUNNEL_NODE = 242,
2027    #[doc = "Illuminator"]
2028    MAV_COMP_ID_ILLUMINATOR = 243,
2029    #[deprecated = "System control does not require a separate component ID. Instead, system commands should be sent with target_component=MAV_COMP_ID_ALL allowing the target component to use any appropriate component id. See `MAV_COMP_ID_ALL` (Deprecated since 2018-11)"]
2030    #[doc = "Deprecated, don't use. Component for handling system messages (e.g. to ARM, takeoff, etc.)."]
2031    MAV_COMP_ID_SYSTEM_CONTROL = 250,
2032}
2033impl MavComponent {
2034    pub const DEFAULT: Self = Self::MAV_COMP_ID_ALL;
2035}
2036impl Default for MavComponent {
2037    fn default() -> Self {
2038        Self::DEFAULT
2039    }
2040}
2041#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2042#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2043#[cfg_attr(feature = "serde", serde(tag = "type"))]
2044#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2045#[repr(u32)]
2046#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-06)"]
2047#[doc = "A data stream is not a fixed set of messages, but rather a      recommendation to the autopilot software. Individual autopilots may or may not obey      the recommended messages."]
2048pub enum MavDataStream {
2049    #[doc = "Enable all data streams"]
2050    MAV_DATA_STREAM_ALL = 0,
2051    #[doc = "Enable IMU_RAW, GPS_RAW, GPS_STATUS packets."]
2052    MAV_DATA_STREAM_RAW_SENSORS = 1,
2053    #[doc = "Enable GPS_STATUS, CONTROL_STATUS, AUX_STATUS"]
2054    MAV_DATA_STREAM_EXTENDED_STATUS = 2,
2055    #[doc = "Enable RC_CHANNELS_SCALED, RC_CHANNELS_RAW, SERVO_OUTPUT_RAW"]
2056    MAV_DATA_STREAM_RC_CHANNELS = 3,
2057    #[doc = "Enable ATTITUDE_CONTROLLER_OUTPUT, POSITION_CONTROLLER_OUTPUT, NAV_CONTROLLER_OUTPUT."]
2058    MAV_DATA_STREAM_RAW_CONTROLLER = 4,
2059    #[doc = "Enable LOCAL_POSITION, GLOBAL_POSITION_INT messages."]
2060    MAV_DATA_STREAM_POSITION = 6,
2061    #[doc = "Dependent on the autopilot"]
2062    MAV_DATA_STREAM_EXTRA1 = 10,
2063    #[doc = "Dependent on the autopilot"]
2064    MAV_DATA_STREAM_EXTRA2 = 11,
2065    #[doc = "Dependent on the autopilot"]
2066    MAV_DATA_STREAM_EXTRA3 = 12,
2067}
2068impl MavDataStream {
2069    pub const DEFAULT: Self = Self::MAV_DATA_STREAM_ALL;
2070}
2071impl Default for MavDataStream {
2072    fn default() -> Self {
2073        Self::DEFAULT
2074    }
2075}
2076#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2077#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2078#[cfg_attr(feature = "serde", serde(tag = "type"))]
2079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2080#[repr(u32)]
2081#[doc = "Enumeration of distance sensor types"]
2082pub enum MavDistanceSensor {
2083    #[doc = "Laser rangefinder, e.g. LightWare SF02/F or PulsedLight units"]
2084    MAV_DISTANCE_SENSOR_LASER = 0,
2085    #[doc = "Ultrasound rangefinder, e.g. MaxBotix units"]
2086    MAV_DISTANCE_SENSOR_ULTRASOUND = 1,
2087    #[doc = "Infrared rangefinder, e.g. Sharp units"]
2088    MAV_DISTANCE_SENSOR_INFRARED = 2,
2089    #[doc = "Radar type, e.g. uLanding units"]
2090    MAV_DISTANCE_SENSOR_RADAR = 3,
2091    #[doc = "Broken or unknown type, e.g. analog units"]
2092    MAV_DISTANCE_SENSOR_UNKNOWN = 4,
2093}
2094impl MavDistanceSensor {
2095    pub const DEFAULT: Self = Self::MAV_DISTANCE_SENSOR_LASER;
2096}
2097impl Default for MavDistanceSensor {
2098    fn default() -> Self {
2099        Self::DEFAULT
2100    }
2101}
2102#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2103#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2104#[cfg_attr(feature = "serde", serde(tag = "type"))]
2105#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2106#[repr(u32)]
2107#[doc = "Bitmap of options for the MAV_CMD_DO_REPOSITION"]
2108pub enum MavDoRepositionFlags {
2109    #[doc = "The aircraft should immediately transition into guided. This should not be set for follow me applications"]
2110    MAV_DO_REPOSITION_FLAGS_CHANGE_MODE = 1,
2111}
2112impl MavDoRepositionFlags {
2113    pub const DEFAULT: Self = Self::MAV_DO_REPOSITION_FLAGS_CHANGE_MODE;
2114}
2115impl Default for MavDoRepositionFlags {
2116    fn default() -> Self {
2117        Self::DEFAULT
2118    }
2119}
2120#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2121#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2122#[cfg_attr(feature = "serde", serde(tag = "type"))]
2123#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2124#[repr(u32)]
2125#[doc = "Enumeration of estimator types"]
2126pub enum MavEstimatorType {
2127    #[doc = "Unknown type of the estimator."]
2128    MAV_ESTIMATOR_TYPE_UNKNOWN = 0,
2129    #[doc = "This is a naive estimator without any real covariance feedback."]
2130    MAV_ESTIMATOR_TYPE_NAIVE = 1,
2131    #[doc = "Computer vision based estimate. Might be up to scale."]
2132    MAV_ESTIMATOR_TYPE_VISION = 2,
2133    #[doc = "Visual-inertial estimate."]
2134    MAV_ESTIMATOR_TYPE_VIO = 3,
2135    #[doc = "Plain GPS estimate."]
2136    MAV_ESTIMATOR_TYPE_GPS = 4,
2137    #[doc = "Estimator integrating GPS and inertial sensing."]
2138    MAV_ESTIMATOR_TYPE_GPS_INS = 5,
2139    #[doc = "Estimate from external motion capturing system."]
2140    MAV_ESTIMATOR_TYPE_MOCAP = 6,
2141    #[doc = "Estimator based on lidar sensor input."]
2142    MAV_ESTIMATOR_TYPE_LIDAR = 7,
2143    #[doc = "Estimator on autopilot."]
2144    MAV_ESTIMATOR_TYPE_AUTOPILOT = 8,
2145}
2146impl MavEstimatorType {
2147    pub const DEFAULT: Self = Self::MAV_ESTIMATOR_TYPE_UNKNOWN;
2148}
2149impl Default for MavEstimatorType {
2150    fn default() -> Self {
2151        Self::DEFAULT
2152    }
2153}
2154#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2155#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2156#[cfg_attr(feature = "serde", serde(tag = "type"))]
2157#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2158#[repr(u32)]
2159#[doc = "Flags for CURRENT_EVENT_SEQUENCE."]
2160pub enum MavEventCurrentSequenceFlags {
2161    #[doc = "A sequence reset has happened (e.g. vehicle reboot)."]
2162    MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET = 1,
2163}
2164impl MavEventCurrentSequenceFlags {
2165    pub const DEFAULT: Self = Self::MAV_EVENT_CURRENT_SEQUENCE_FLAGS_RESET;
2166}
2167impl Default for MavEventCurrentSequenceFlags {
2168    fn default() -> Self {
2169        Self::DEFAULT
2170    }
2171}
2172#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2173#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2174#[cfg_attr(feature = "serde", serde(tag = "type"))]
2175#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2176#[repr(u32)]
2177#[doc = "Reason for an event error response."]
2178pub enum MavEventErrorReason {
2179    #[doc = "The requested event is not available (anymore)."]
2180    MAV_EVENT_ERROR_REASON_UNAVAILABLE = 0,
2181}
2182impl MavEventErrorReason {
2183    pub const DEFAULT: Self = Self::MAV_EVENT_ERROR_REASON_UNAVAILABLE;
2184}
2185impl Default for MavEventErrorReason {
2186    fn default() -> Self {
2187        Self::DEFAULT
2188    }
2189}
2190#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2191#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2192#[cfg_attr(feature = "serde", serde(tag = "type"))]
2193#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2194#[repr(u32)]
2195#[doc = "Coordinate frames used by MAVLink. Not all frames are supported by all commands, messages, or vehicles.        Global frames use the following naming conventions:       - \"GLOBAL\": Global coordinate frame with WGS84 latitude/longitude and altitude positive over mean sea level (MSL) by default.         The following modifiers may be used with \"GLOBAL\":         - \"RELATIVE_ALT\": Altitude is relative to the vehicle home position rather than MSL.         - \"TERRAIN_ALT\": Altitude is relative to ground level rather than MSL.         - \"INT\": Latitude/longitude (in degrees) are scaled by multiplying by 1E7.        Local frames use the following naming conventions:       - \"LOCAL\": Origin of local frame is fixed relative to earth. Unless otherwise specified this origin is the origin of the vehicle position-estimator (\"EKF\").       - \"BODY\": Origin of local frame travels with the vehicle. NOTE, \"BODY\" does NOT indicate alignment of frame axis with vehicle attitude.       - \"OFFSET\": Deprecated synonym for \"BODY\" (origin travels with the vehicle). Not to be used for new frames.        Some deprecated frames do not follow these conventions (e.g. MAV_FRAME_BODY_NED and MAV_FRAME_BODY_OFFSET_NED)."]
2196pub enum MavFrame {
2197    #[doc = "Global (WGS84) coordinate frame + altitude relative to mean sea level (MSL)."]
2198    MAV_FRAME_GLOBAL = 0,
2199    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin fixed relative to earth."]
2200    MAV_FRAME_LOCAL_NED = 1,
2201    #[doc = "NOT a coordinate frame, indicates a mission command."]
2202    MAV_FRAME_MISSION = 2,
2203    #[doc = "Global (WGS84) coordinate frame + altitude relative to the home position."]
2204    MAV_FRAME_GLOBAL_RELATIVE_ALT = 3,
2205    #[doc = "ENU local tangent frame (x: East, y: North, z: Up) with origin fixed relative to earth."]
2206    MAV_FRAME_LOCAL_ENU = 4,
2207    #[deprecated = "Use MAV_FRAME_GLOBAL in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL` (Deprecated since 2024-03)"]
2208    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to mean sea level (MSL)."]
2209    MAV_FRAME_GLOBAL_INT = 5,
2210    #[deprecated = "Use MAV_FRAME_GLOBAL_RELATIVE_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_RELATIVE_ALT` (Deprecated since 2024-03)"]
2211    #[doc = "Global (WGS84) coordinate frame (scaled) + altitude relative to the home position."]
2212    MAV_FRAME_GLOBAL_RELATIVE_ALT_INT = 6,
2213    #[doc = "NED local tangent frame (x: North, y: East, z: Down) with origin that travels with the vehicle."]
2214    MAV_FRAME_LOCAL_OFFSET_NED = 7,
2215    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2216    #[doc = "Same as MAV_FRAME_LOCAL_NED when used to represent position values. Same as MAV_FRAME_BODY_FRD when used with velocity/acceleration values."]
2217    MAV_FRAME_BODY_NED = 8,
2218    #[deprecated = " See `MAV_FRAME_BODY_FRD` (Deprecated since 2019-08)"]
2219    #[doc = "This is the same as MAV_FRAME_BODY_FRD."]
2220    MAV_FRAME_BODY_OFFSET_NED = 9,
2221    #[doc = "Global (WGS84) coordinate frame with AGL altitude (altitude at ground level)."]
2222    MAV_FRAME_GLOBAL_TERRAIN_ALT = 10,
2223    #[deprecated = "Use MAV_FRAME_GLOBAL_TERRAIN_ALT in COMMAND_INT (and elsewhere) as a synonymous replacement. See `MAV_FRAME_GLOBAL_TERRAIN_ALT` (Deprecated since 2024-03)"]
2224    #[doc = "Global (WGS84) coordinate frame (scaled) with AGL altitude (altitude at ground level)."]
2225    MAV_FRAME_GLOBAL_TERRAIN_ALT_INT = 11,
2226    #[doc = "FRD local frame aligned to the vehicle's attitude (x: Forward, y: Right, z: Down) with an origin that travels with vehicle."]
2227    MAV_FRAME_BODY_FRD = 12,
2228    #[deprecated = "  (Deprecated since 2019-04)"]
2229    #[doc = "MAV_FRAME_BODY_FLU - Body fixed frame of reference, Z-up (x: Forward, y: Left, z: Up)."]
2230    MAV_FRAME_RESERVED_13 = 13,
2231    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2232    #[doc = "MAV_FRAME_MOCAP_NED - Odometry local coordinate frame of data given by a motion capture system, Z-down (x: North, y: East, z: Down)."]
2233    MAV_FRAME_RESERVED_14 = 14,
2234    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2235    #[doc = "MAV_FRAME_MOCAP_ENU - Odometry local coordinate frame of data given by a motion capture system, Z-up (x: East, y: North, z: Up)."]
2236    MAV_FRAME_RESERVED_15 = 15,
2237    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2238    #[doc = "MAV_FRAME_VISION_NED - Odometry local coordinate frame of data given by a vision estimation system, Z-down (x: North, y: East, z: Down)."]
2239    MAV_FRAME_RESERVED_16 = 16,
2240    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2241    #[doc = "MAV_FRAME_VISION_ENU - Odometry local coordinate frame of data given by a vision estimation system, Z-up (x: East, y: North, z: Up)."]
2242    MAV_FRAME_RESERVED_17 = 17,
2243    #[deprecated = " See `MAV_FRAME_LOCAL_FRD` (Deprecated since 2019-04)"]
2244    #[doc = "MAV_FRAME_ESTIM_NED - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-down (x: North, y: East, z: Down)."]
2245    MAV_FRAME_RESERVED_18 = 18,
2246    #[deprecated = " See `MAV_FRAME_LOCAL_FLU` (Deprecated since 2019-04)"]
2247    #[doc = "MAV_FRAME_ESTIM_ENU - Odometry local coordinate frame of data given by an estimator running onboard the vehicle, Z-up (x: East, y: North, z: Up)."]
2248    MAV_FRAME_RESERVED_19 = 19,
2249    #[doc = "FRD local tangent frame (x: Forward, y: Right, z: Down) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2250    MAV_FRAME_LOCAL_FRD = 20,
2251    #[doc = "FLU local tangent frame (x: Forward, y: Left, z: Up) with origin fixed relative to earth. The forward axis is aligned to the front of the vehicle in the horizontal plane."]
2252    MAV_FRAME_LOCAL_FLU = 21,
2253}
2254impl MavFrame {
2255    pub const DEFAULT: Self = Self::MAV_FRAME_GLOBAL;
2256}
2257impl Default for MavFrame {
2258    fn default() -> Self {
2259        Self::DEFAULT
2260    }
2261}
2262#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2263#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2264#[cfg_attr(feature = "serde", serde(tag = "type"))]
2265#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2266#[repr(u32)]
2267#[doc = "MAV FTP error codes (<https://mavlink.io/en/services/ftp.html>)"]
2268pub enum MavFtpErr {
2269    #[doc = "None: No error"]
2270    MAV_FTP_ERR_NONE = 0,
2271    #[doc = "Fail: Unknown failure"]
2272    MAV_FTP_ERR_FAIL = 1,
2273    #[doc = "FailErrno: Command failed, Err number sent back in PayloadHeader.data[1]. \t\tThis is a file-system error number understood by the server operating system."]
2274    MAV_FTP_ERR_FAILERRNO = 2,
2275    #[doc = "InvalidDataSize: Payload size is invalid"]
2276    MAV_FTP_ERR_INVALIDDATASIZE = 3,
2277    #[doc = "InvalidSession: Session is not currently open"]
2278    MAV_FTP_ERR_INVALIDSESSION = 4,
2279    #[doc = "NoSessionsAvailable: All available sessions are already in use"]
2280    MAV_FTP_ERR_NOSESSIONSAVAILABLE = 5,
2281    #[doc = "EOF: Offset past end of file for ListDirectory and ReadFile commands"]
2282    MAV_FTP_ERR_EOF = 6,
2283    #[doc = "UnknownCommand: Unknown command / opcode"]
2284    MAV_FTP_ERR_UNKNOWNCOMMAND = 7,
2285    #[doc = "FileExists: File/directory already exists"]
2286    MAV_FTP_ERR_FILEEXISTS = 8,
2287    #[doc = "FileProtected: File/directory is write protected"]
2288    MAV_FTP_ERR_FILEPROTECTED = 9,
2289    #[doc = "FileNotFound: File/directory not found"]
2290    MAV_FTP_ERR_FILENOTFOUND = 10,
2291}
2292impl MavFtpErr {
2293    pub const DEFAULT: Self = Self::MAV_FTP_ERR_NONE;
2294}
2295impl Default for MavFtpErr {
2296    fn default() -> Self {
2297        Self::DEFAULT
2298    }
2299}
2300#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2301#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2302#[cfg_attr(feature = "serde", serde(tag = "type"))]
2303#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2304#[repr(u32)]
2305#[doc = "MAV FTP opcodes: <https://mavlink.io/en/services/ftp.html>"]
2306pub enum MavFtpOpcode {
2307    #[doc = "None. Ignored, always ACKed"]
2308    MAV_FTP_OPCODE_NONE = 0,
2309    #[doc = "TerminateSession: Terminates open Read session"]
2310    MAV_FTP_OPCODE_TERMINATESESSION = 1,
2311    #[doc = "ResetSessions: Terminates all open read sessions"]
2312    MAV_FTP_OPCODE_RESETSESSION = 2,
2313    #[doc = "ListDirectory. List files and directories in path from offset"]
2314    MAV_FTP_OPCODE_LISTDIRECTORY = 3,
2315    #[doc = "OpenFileRO: Opens file at path for reading, returns session"]
2316    MAV_FTP_OPCODE_OPENFILERO = 4,
2317    #[doc = "ReadFile: Reads size bytes from offset in session"]
2318    MAV_FTP_OPCODE_READFILE = 5,
2319    #[doc = "CreateFile: Creates file at path for writing, returns session"]
2320    MAV_FTP_OPCODE_CREATEFILE = 6,
2321    #[doc = "WriteFile: Writes size bytes to offset in session"]
2322    MAV_FTP_OPCODE_WRITEFILE = 7,
2323    #[doc = "RemoveFile: Remove file at path"]
2324    MAV_FTP_OPCODE_REMOVEFILE = 8,
2325    #[doc = "CreateDirectory: Creates directory at path"]
2326    MAV_FTP_OPCODE_CREATEDIRECTORY = 9,
2327    #[doc = "RemoveDirectory: Removes directory at path. The directory must be empty."]
2328    MAV_FTP_OPCODE_REMOVEDIRECTORY = 10,
2329    #[doc = "OpenFileWO: Opens file at path for writing, returns session"]
2330    MAV_FTP_OPCODE_OPENFILEWO = 11,
2331    #[doc = "TruncateFile: Truncate file at path to offset length"]
2332    MAV_FTP_OPCODE_TRUNCATEFILE = 12,
2333    #[doc = "Rename: Rename path1 to path2"]
2334    MAV_FTP_OPCODE_RENAME = 13,
2335    #[doc = "CalcFileCRC32: Calculate CRC32 for file at path"]
2336    MAV_FTP_OPCODE_CALCFILECRC = 14,
2337    #[doc = "BurstReadFile: Burst download session file"]
2338    MAV_FTP_OPCODE_BURSTREADFILE = 15,
2339    #[doc = "ACK: ACK response"]
2340    MAV_FTP_OPCODE_ACK = 128,
2341    #[doc = "NAK: NAK response"]
2342    MAV_FTP_OPCODE_NAK = 129,
2343}
2344impl MavFtpOpcode {
2345    pub const DEFAULT: Self = Self::MAV_FTP_OPCODE_NONE;
2346}
2347impl Default for MavFtpOpcode {
2348    fn default() -> Self {
2349        Self::DEFAULT
2350    }
2351}
2352#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2353#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2354#[cfg_attr(feature = "serde", serde(tag = "type"))]
2355#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2356#[repr(u32)]
2357#[doc = "Fuel types for use in FUEL_TYPE. Fuel types specify the units for the maximum, available and consumed fuel, and for the flow rates."]
2358pub enum MavFuelType {
2359    #[doc = "Not specified. Fuel levels are normalized (i.e. maximum is 1, and other levels are relative to 1)."]
2360    MAV_FUEL_TYPE_UNKNOWN = 0,
2361    #[doc = "A generic liquid fuel. Fuel levels are in millilitres (ml). Fuel rates are in millilitres/second."]
2362    MAV_FUEL_TYPE_LIQUID = 1,
2363    #[doc = "A gas tank. Fuel levels are in kilo-Pascal (kPa), and flow rates are in milliliters per second (ml/s)."]
2364    MAV_FUEL_TYPE_GAS = 2,
2365}
2366impl MavFuelType {
2367    pub const DEFAULT: Self = Self::MAV_FUEL_TYPE_UNKNOWN;
2368}
2369impl Default for MavFuelType {
2370    fn default() -> Self {
2371        Self::DEFAULT
2372    }
2373}
2374bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to report status/failure cases for a power generator (used in GENERATOR_STATUS). Note that FAULTS are conditions that cause the generator to fail. Warnings are conditions that require attention before the next use (they indicate the system is not operating properly)."] pub struct MavGeneratorStatusFlag : u64 { # [doc = "Generator is off."] const MAV_GENERATOR_STATUS_FLAG_OFF = 1 ; # [doc = "Generator is ready to start generating power."] const MAV_GENERATOR_STATUS_FLAG_READY = 2 ; # [doc = "Generator is generating power."] const MAV_GENERATOR_STATUS_FLAG_GENERATING = 4 ; # [doc = "Generator is charging the batteries (generating enough power to charge and provide the load)."] const MAV_GENERATOR_STATUS_FLAG_CHARGING = 8 ; # [doc = "Generator is operating at a reduced maximum power."] const MAV_GENERATOR_STATUS_FLAG_REDUCED_POWER = 16 ; # [doc = "Generator is providing the maximum output."] const MAV_GENERATOR_STATUS_FLAG_MAXPOWER = 32 ; # [doc = "Generator is near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_WARNING = 64 ; # [doc = "Generator hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_OVERTEMP_FAULT = 128 ; # [doc = "Power electronics are near the maximum operating temperature, cooling is insufficient."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_WARNING = 256 ; # [doc = "Power electronics hit the maximum operating temperature and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_OVERTEMP_FAULT = 512 ; # [doc = "Power electronics experienced a fault and shutdown."] const MAV_GENERATOR_STATUS_FLAG_ELECTRONICS_FAULT = 1024 ; # [doc = "The power source supplying the generator failed e.g. mechanical generator stopped, tether is no longer providing power, solar cell is in shade, hydrogen reaction no longer happening."] const MAV_GENERATOR_STATUS_FLAG_POWERSOURCE_FAULT = 2048 ; # [doc = "Generator controller having communication problems."] const MAV_GENERATOR_STATUS_FLAG_COMMUNICATION_WARNING = 4096 ; # [doc = "Power electronic or generator cooling system error."] const MAV_GENERATOR_STATUS_FLAG_COOLING_WARNING = 8192 ; # [doc = "Generator controller power rail experienced a fault."] const MAV_GENERATOR_STATUS_FLAG_POWER_RAIL_FAULT = 16384 ; # [doc = "Generator controller exceeded the overcurrent threshold and shutdown to prevent damage."] const MAV_GENERATOR_STATUS_FLAG_OVERCURRENT_FAULT = 32768 ; # [doc = "Generator controller detected a high current going into the batteries and shutdown to prevent battery damage."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_OVERCHARGE_CURRENT_FAULT = 65536 ; # [doc = "Generator controller exceeded it's overvoltage threshold and shutdown to prevent it exceeding the voltage rating."] const MAV_GENERATOR_STATUS_FLAG_OVERVOLTAGE_FAULT = 131072 ; # [doc = "Batteries are under voltage (generator will not start)."] const MAV_GENERATOR_STATUS_FLAG_BATTERY_UNDERVOLT_FAULT = 262144 ; # [doc = "Generator start is inhibited by e.g. a safety switch."] const MAV_GENERATOR_STATUS_FLAG_START_INHIBITED = 524288 ; # [doc = "Generator requires maintenance."] const MAV_GENERATOR_STATUS_FLAG_MAINTENANCE_REQUIRED = 1048576 ; # [doc = "Generator is not ready to generate yet."] const MAV_GENERATOR_STATUS_FLAG_WARMING_UP = 2097152 ; # [doc = "Generator is idle."] const MAV_GENERATOR_STATUS_FLAG_IDLE = 4194304 ; } }
2375impl MavGeneratorStatusFlag {
2376    pub const DEFAULT: Self = Self::MAV_GENERATOR_STATUS_FLAG_OFF;
2377}
2378impl Default for MavGeneratorStatusFlag {
2379    fn default() -> Self {
2380        Self::DEFAULT
2381    }
2382}
2383#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2384#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2385#[cfg_attr(feature = "serde", serde(tag = "type"))]
2386#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2387#[repr(u32)]
2388#[doc = "Actions that may be specified in MAV_CMD_OVERRIDE_GOTO to override mission execution."]
2389pub enum MavGoto {
2390    #[doc = "Hold at the current position."]
2391    MAV_GOTO_DO_HOLD = 0,
2392    #[doc = "Continue with the next item in mission execution."]
2393    MAV_GOTO_DO_CONTINUE = 1,
2394    #[doc = "Hold at the current position of the system"]
2395    MAV_GOTO_HOLD_AT_CURRENT_POSITION = 2,
2396    #[doc = "Hold at the position specified in the parameters of the DO_HOLD action"]
2397    MAV_GOTO_HOLD_AT_SPECIFIED_POSITION = 3,
2398}
2399impl MavGoto {
2400    pub const DEFAULT: Self = Self::MAV_GOTO_DO_HOLD;
2401}
2402impl Default for MavGoto {
2403    fn default() -> Self {
2404        Self::DEFAULT
2405    }
2406}
2407#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2408#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2409#[cfg_attr(feature = "serde", serde(tag = "type"))]
2410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2411#[repr(u32)]
2412#[doc = "Enumeration of landed detector states"]
2413pub enum MavLandedState {
2414    #[doc = "MAV landed state is unknown"]
2415    MAV_LANDED_STATE_UNDEFINED = 0,
2416    #[doc = "MAV is landed (on ground)"]
2417    MAV_LANDED_STATE_ON_GROUND = 1,
2418    #[doc = "MAV is in air"]
2419    MAV_LANDED_STATE_IN_AIR = 2,
2420    #[doc = "MAV currently taking off"]
2421    MAV_LANDED_STATE_TAKEOFF = 3,
2422    #[doc = "MAV currently landing"]
2423    MAV_LANDED_STATE_LANDING = 4,
2424}
2425impl MavLandedState {
2426    pub const DEFAULT: Self = Self::MAV_LANDED_STATE_UNDEFINED;
2427}
2428impl Default for MavLandedState {
2429    fn default() -> Self {
2430        Self::DEFAULT
2431    }
2432}
2433#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2435#[cfg_attr(feature = "serde", serde(tag = "type"))]
2436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2437#[repr(u32)]
2438#[doc = "Result of mission operation (in a MISSION_ACK message)."]
2439pub enum MavMissionResult {
2440    #[doc = "mission accepted OK"]
2441    MAV_MISSION_ACCEPTED = 0,
2442    #[doc = "Generic error / not accepting mission commands at all right now."]
2443    MAV_MISSION_ERROR = 1,
2444    #[doc = "Coordinate frame is not supported."]
2445    MAV_MISSION_UNSUPPORTED_FRAME = 2,
2446    #[doc = "Command is not supported."]
2447    MAV_MISSION_UNSUPPORTED = 3,
2448    #[doc = "Mission items exceed storage space."]
2449    MAV_MISSION_NO_SPACE = 4,
2450    #[doc = "One of the parameters has an invalid value."]
2451    MAV_MISSION_INVALID = 5,
2452    #[doc = "param1 has an invalid value."]
2453    MAV_MISSION_INVALID_PARAM1 = 6,
2454    #[doc = "param2 has an invalid value."]
2455    MAV_MISSION_INVALID_PARAM2 = 7,
2456    #[doc = "param3 has an invalid value."]
2457    MAV_MISSION_INVALID_PARAM3 = 8,
2458    #[doc = "param4 has an invalid value."]
2459    MAV_MISSION_INVALID_PARAM4 = 9,
2460    #[doc = "x / param5 has an invalid value."]
2461    MAV_MISSION_INVALID_PARAM5_X = 10,
2462    #[doc = "y / param6 has an invalid value."]
2463    MAV_MISSION_INVALID_PARAM6_Y = 11,
2464    #[doc = "z / param7 has an invalid value."]
2465    MAV_MISSION_INVALID_PARAM7 = 12,
2466    #[doc = "Mission item received out of sequence"]
2467    MAV_MISSION_INVALID_SEQUENCE = 13,
2468    #[doc = "Not accepting any mission commands from this communication partner."]
2469    MAV_MISSION_DENIED = 14,
2470    #[doc = "Current mission operation cancelled (e.g. mission upload, mission download)."]
2471    MAV_MISSION_OPERATION_CANCELLED = 15,
2472}
2473impl MavMissionResult {
2474    pub const DEFAULT: Self = Self::MAV_MISSION_ACCEPTED;
2475}
2476impl Default for MavMissionResult {
2477    fn default() -> Self {
2478        Self::DEFAULT
2479    }
2480}
2481#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2482#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2483#[cfg_attr(feature = "serde", serde(tag = "type"))]
2484#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2485#[repr(u32)]
2486#[doc = "Type of mission items being requested/sent in mission protocol."]
2487pub enum MavMissionType {
2488    #[doc = "Items are mission commands for main mission."]
2489    MAV_MISSION_TYPE_MISSION = 0,
2490    #[doc = "Specifies GeoFence area(s). Items are MAV_CMD_NAV_FENCE_ GeoFence items."]
2491    MAV_MISSION_TYPE_FENCE = 1,
2492    #[doc = "Specifies the rally points for the vehicle. Rally points are alternative RTL points. Items are MAV_CMD_NAV_RALLY_POINT rally point items."]
2493    MAV_MISSION_TYPE_RALLY = 2,
2494    #[doc = "Only used in MISSION_CLEAR_ALL to clear all mission types."]
2495    MAV_MISSION_TYPE_ALL = 255,
2496}
2497impl MavMissionType {
2498    pub const DEFAULT: Self = Self::MAV_MISSION_TYPE_MISSION;
2499}
2500impl Default for MavMissionType {
2501    fn default() -> Self {
2502        Self::DEFAULT
2503    }
2504}
2505#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2506#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2507#[cfg_attr(feature = "serde", serde(tag = "type"))]
2508#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2509#[repr(u32)]
2510#[doc = "These defines are predefined OR-combined mode flags. There is no need to use values from this enum, but it                simplifies the use of the mode flags. Note that manual input is enabled in all modes as a safety override."]
2511pub enum MavMode {
2512    #[doc = "System is not ready to fly, booting, calibrating, etc. No flag is set."]
2513    MAV_MODE_PREFLIGHT = 0,
2514    #[doc = "System is allowed to be active, under assisted RC control."]
2515    MAV_MODE_STABILIZE_DISARMED = 80,
2516    #[doc = "System is allowed to be active, under assisted RC control."]
2517    MAV_MODE_STABILIZE_ARMED = 208,
2518    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2519    MAV_MODE_MANUAL_DISARMED = 64,
2520    #[doc = "System is allowed to be active, under manual (RC) control, no stabilization"]
2521    MAV_MODE_MANUAL_ARMED = 192,
2522    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2523    MAV_MODE_GUIDED_DISARMED = 88,
2524    #[doc = "System is allowed to be active, under autonomous control, manual setpoint"]
2525    MAV_MODE_GUIDED_ARMED = 216,
2526    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2527    MAV_MODE_AUTO_DISARMED = 92,
2528    #[doc = "System is allowed to be active, under autonomous control and navigation (the trajectory is decided onboard and not pre-programmed by waypoints)"]
2529    MAV_MODE_AUTO_ARMED = 220,
2530    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2531    MAV_MODE_TEST_DISARMED = 66,
2532    #[doc = "UNDEFINED mode. This solely depends on the autopilot - use with caution, intended for developers only."]
2533    MAV_MODE_TEST_ARMED = 194,
2534}
2535impl MavMode {
2536    pub const DEFAULT: Self = Self::MAV_MODE_PREFLIGHT;
2537}
2538impl Default for MavMode {
2539    fn default() -> Self {
2540        Self::DEFAULT
2541    }
2542}
2543bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These flags encode the MAV mode."] pub struct MavModeFlag : u8 { # [doc = "0b10000000 MAV safety set to armed. Motors are enabled / running / can start. Ready to fly. Additional note: this flag is to be ignore when sent in the command MAV_CMD_DO_SET_MODE and MAV_CMD_COMPONENT_ARM_DISARM shall be used instead. The flag can still be used to report the armed state."] const MAV_MODE_FLAG_SAFETY_ARMED = 128 ; # [doc = "0b01000000 remote control input is enabled."] const MAV_MODE_FLAG_MANUAL_INPUT_ENABLED = 64 ; # [doc = "0b00100000 hardware in the loop simulation. All motors / actuators are blocked, but internal software is full operational."] const MAV_MODE_FLAG_HIL_ENABLED = 32 ; # [doc = "0b00010000 system stabilizes electronically its attitude (and optionally position). It needs however further control inputs to move around."] const MAV_MODE_FLAG_STABILIZE_ENABLED = 16 ; # [doc = "0b00001000 guided mode enabled, system flies waypoints / mission items."] const MAV_MODE_FLAG_GUIDED_ENABLED = 8 ; # [doc = "0b00000100 autonomous mode enabled, system finds its own goal positions. Guided flag can be set or not, depends on the actual implementation."] const MAV_MODE_FLAG_AUTO_ENABLED = 4 ; # [doc = "0b00000010 system has a test mode enabled. This flag is intended for temporary system tests and should not be used for stable implementations."] const MAV_MODE_FLAG_TEST_ENABLED = 2 ; # [doc = "0b00000001 Reserved for future use."] const MAV_MODE_FLAG_CUSTOM_MODE_ENABLED = 1 ; } }
2544impl MavModeFlag {
2545    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_SAFETY_ARMED;
2546}
2547impl Default for MavModeFlag {
2548    fn default() -> Self {
2549        Self::DEFAULT
2550    }
2551}
2552#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2553#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2554#[cfg_attr(feature = "serde", serde(tag = "type"))]
2555#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2556#[repr(u32)]
2557#[doc = "These values encode the bit positions of the decode position. These values can be used to read the value of a flag bit by combining the base_mode variable with AND with the flag position value. The result will be either 0 or 1, depending on if the flag is set or not."]
2558pub enum MavModeFlagDecodePosition {
2559    #[doc = "First bit:  10000000"]
2560    MAV_MODE_FLAG_DECODE_POSITION_SAFETY = 128,
2561    #[doc = "Second bit: 01000000"]
2562    MAV_MODE_FLAG_DECODE_POSITION_MANUAL = 64,
2563    #[doc = "Third bit:  00100000"]
2564    MAV_MODE_FLAG_DECODE_POSITION_HIL = 32,
2565    #[doc = "Fourth bit: 00010000"]
2566    MAV_MODE_FLAG_DECODE_POSITION_STABILIZE = 16,
2567    #[doc = "Fifth bit:  00001000"]
2568    MAV_MODE_FLAG_DECODE_POSITION_GUIDED = 8,
2569    #[doc = "Sixth bit:   00000100"]
2570    MAV_MODE_FLAG_DECODE_POSITION_AUTO = 4,
2571    #[doc = "Seventh bit: 00000010"]
2572    MAV_MODE_FLAG_DECODE_POSITION_TEST = 2,
2573    #[doc = "Eighth bit: 00000001"]
2574    MAV_MODE_FLAG_DECODE_POSITION_CUSTOM_MODE = 1,
2575}
2576impl MavModeFlagDecodePosition {
2577    pub const DEFAULT: Self = Self::MAV_MODE_FLAG_DECODE_POSITION_SAFETY;
2578}
2579impl Default for MavModeFlagDecodePosition {
2580    fn default() -> Self {
2581        Self::DEFAULT
2582    }
2583}
2584bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Mode properties."] pub struct MavModeProperty : u32 { # [doc = "If set, this mode is an advanced mode.           For example a rate-controlled manual mode might be advanced, whereas a position-controlled manual mode is not.           A GCS can optionally use this flag to configure the UI for its intended users."] const MAV_MODE_PROPERTY_ADVANCED = 1 ; # [doc = "If set, this mode should not be added to the list of selectable modes.           The mode might still be selected by the FC directly (for example as part of a failsafe)."] const MAV_MODE_PROPERTY_NOT_USER_SELECTABLE = 2 ; # [doc = "If set, this mode is automatically controlled (it may use but does not require a manual controller).           If unset the mode is a assumed to require user input (be a manual mode)."] const MAV_MODE_PROPERTY_AUTO_MODE = 4 ; } }
2585impl MavModeProperty {
2586    pub const DEFAULT: Self = Self::MAV_MODE_PROPERTY_ADVANCED;
2587}
2588impl Default for MavModeProperty {
2589    fn default() -> Self {
2590        Self::DEFAULT
2591    }
2592}
2593#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2595#[cfg_attr(feature = "serde", serde(tag = "type"))]
2596#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2597#[repr(u32)]
2598#[deprecated = " See `GIMBAL_MANAGER_FLAGS` (Deprecated since 2020-01)"]
2599#[doc = "Enumeration of possible mount operation modes. This message is used by obsolete/deprecated gimbal messages."]
2600pub enum MavMountMode {
2601    #[doc = "Load and keep safe position (Roll,Pitch,Yaw) from permanent memory and stop stabilization"]
2602    MAV_MOUNT_MODE_RETRACT = 0,
2603    #[doc = "Load and keep neutral position (Roll,Pitch,Yaw) from permanent memory."]
2604    MAV_MOUNT_MODE_NEUTRAL = 1,
2605    #[doc = "Load neutral position and start MAVLink Roll,Pitch,Yaw control with stabilization"]
2606    MAV_MOUNT_MODE_MAVLINK_TARGETING = 2,
2607    #[doc = "Load neutral position and start RC Roll,Pitch,Yaw control with stabilization"]
2608    MAV_MOUNT_MODE_RC_TARGETING = 3,
2609    #[doc = "Load neutral position and start to point to Lat,Lon,Alt"]
2610    MAV_MOUNT_MODE_GPS_POINT = 4,
2611    #[doc = "Gimbal tracks system with specified system ID"]
2612    MAV_MOUNT_MODE_SYSID_TARGET = 5,
2613    #[doc = "Gimbal tracks home position"]
2614    MAV_MOUNT_MODE_HOME_LOCATION = 6,
2615}
2616impl MavMountMode {
2617    pub const DEFAULT: Self = Self::MAV_MOUNT_MODE_RETRACT;
2618}
2619impl Default for MavMountMode {
2620    fn default() -> Self {
2621        Self::DEFAULT
2622    }
2623}
2624#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2625#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2626#[cfg_attr(feature = "serde", serde(tag = "type"))]
2627#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2628#[repr(u32)]
2629pub enum MavOdidArmStatus {
2630    #[doc = "Passing arming checks."]
2631    MAV_ODID_ARM_STATUS_GOOD_TO_ARM = 0,
2632    #[doc = "Generic arming failure, see error string for details."]
2633    MAV_ODID_ARM_STATUS_PRE_ARM_FAIL_GENERIC = 1,
2634}
2635impl MavOdidArmStatus {
2636    pub const DEFAULT: Self = Self::MAV_ODID_ARM_STATUS_GOOD_TO_ARM;
2637}
2638impl Default for MavOdidArmStatus {
2639    fn default() -> Self {
2640        Self::DEFAULT
2641    }
2642}
2643#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2645#[cfg_attr(feature = "serde", serde(tag = "type"))]
2646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2647#[repr(u32)]
2648pub enum MavOdidAuthType {
2649    #[doc = "No authentication type is specified."]
2650    MAV_ODID_AUTH_TYPE_NONE = 0,
2651    #[doc = "Signature for the UAS (Unmanned Aircraft System) ID."]
2652    MAV_ODID_AUTH_TYPE_UAS_ID_SIGNATURE = 1,
2653    #[doc = "Signature for the Operator ID."]
2654    MAV_ODID_AUTH_TYPE_OPERATOR_ID_SIGNATURE = 2,
2655    #[doc = "Signature for the entire message set."]
2656    MAV_ODID_AUTH_TYPE_MESSAGE_SET_SIGNATURE = 3,
2657    #[doc = "Authentication is provided by Network Remote ID."]
2658    MAV_ODID_AUTH_TYPE_NETWORK_REMOTE_ID = 4,
2659    #[doc = "The exact authentication type is indicated by the first byte of authentication_data and these type values are managed by ICAO."]
2660    MAV_ODID_AUTH_TYPE_SPECIFIC_AUTHENTICATION = 5,
2661}
2662impl MavOdidAuthType {
2663    pub const DEFAULT: Self = Self::MAV_ODID_AUTH_TYPE_NONE;
2664}
2665impl Default for MavOdidAuthType {
2666    fn default() -> Self {
2667        Self::DEFAULT
2668    }
2669}
2670#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2671#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2672#[cfg_attr(feature = "serde", serde(tag = "type"))]
2673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2674#[repr(u32)]
2675pub enum MavOdidCategoryEu {
2676    #[doc = "The category for the UA, according to the EU specification, is undeclared."]
2677    MAV_ODID_CATEGORY_EU_UNDECLARED = 0,
2678    #[doc = "The category for the UA, according to the EU specification, is the Open category."]
2679    MAV_ODID_CATEGORY_EU_OPEN = 1,
2680    #[doc = "The category for the UA, according to the EU specification, is the Specific category."]
2681    MAV_ODID_CATEGORY_EU_SPECIFIC = 2,
2682    #[doc = "The category for the UA, according to the EU specification, is the Certified category."]
2683    MAV_ODID_CATEGORY_EU_CERTIFIED = 3,
2684}
2685impl MavOdidCategoryEu {
2686    pub const DEFAULT: Self = Self::MAV_ODID_CATEGORY_EU_UNDECLARED;
2687}
2688impl Default for MavOdidCategoryEu {
2689    fn default() -> Self {
2690        Self::DEFAULT
2691    }
2692}
2693#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2695#[cfg_attr(feature = "serde", serde(tag = "type"))]
2696#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2697#[repr(u32)]
2698pub enum MavOdidClassEu {
2699    #[doc = "The class for the UA, according to the EU specification, is undeclared."]
2700    MAV_ODID_CLASS_EU_UNDECLARED = 0,
2701    #[doc = "The class for the UA, according to the EU specification, is Class 0."]
2702    MAV_ODID_CLASS_EU_CLASS_0 = 1,
2703    #[doc = "The class for the UA, according to the EU specification, is Class 1."]
2704    MAV_ODID_CLASS_EU_CLASS_1 = 2,
2705    #[doc = "The class for the UA, according to the EU specification, is Class 2."]
2706    MAV_ODID_CLASS_EU_CLASS_2 = 3,
2707    #[doc = "The class for the UA, according to the EU specification, is Class 3."]
2708    MAV_ODID_CLASS_EU_CLASS_3 = 4,
2709    #[doc = "The class for the UA, according to the EU specification, is Class 4."]
2710    MAV_ODID_CLASS_EU_CLASS_4 = 5,
2711    #[doc = "The class for the UA, according to the EU specification, is Class 5."]
2712    MAV_ODID_CLASS_EU_CLASS_5 = 6,
2713    #[doc = "The class for the UA, according to the EU specification, is Class 6."]
2714    MAV_ODID_CLASS_EU_CLASS_6 = 7,
2715}
2716impl MavOdidClassEu {
2717    pub const DEFAULT: Self = Self::MAV_ODID_CLASS_EU_UNDECLARED;
2718}
2719impl Default for MavOdidClassEu {
2720    fn default() -> Self {
2721        Self::DEFAULT
2722    }
2723}
2724#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2726#[cfg_attr(feature = "serde", serde(tag = "type"))]
2727#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2728#[repr(u32)]
2729pub enum MavOdidClassificationType {
2730    #[doc = "The classification type for the UA is undeclared."]
2731    MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED = 0,
2732    #[doc = "The classification type for the UA follows EU (European Union) specifications."]
2733    MAV_ODID_CLASSIFICATION_TYPE_EU = 1,
2734}
2735impl MavOdidClassificationType {
2736    pub const DEFAULT: Self = Self::MAV_ODID_CLASSIFICATION_TYPE_UNDECLARED;
2737}
2738impl Default for MavOdidClassificationType {
2739    fn default() -> Self {
2740        Self::DEFAULT
2741    }
2742}
2743#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2744#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2745#[cfg_attr(feature = "serde", serde(tag = "type"))]
2746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2747#[repr(u32)]
2748pub enum MavOdidDescType {
2749    #[doc = "Optional free-form text description of the purpose of the flight."]
2750    MAV_ODID_DESC_TYPE_TEXT = 0,
2751    #[doc = "Optional additional clarification when status == MAV_ODID_STATUS_EMERGENCY."]
2752    MAV_ODID_DESC_TYPE_EMERGENCY = 1,
2753    #[doc = "Optional additional clarification when status != MAV_ODID_STATUS_EMERGENCY."]
2754    MAV_ODID_DESC_TYPE_EXTENDED_STATUS = 2,
2755}
2756impl MavOdidDescType {
2757    pub const DEFAULT: Self = Self::MAV_ODID_DESC_TYPE_TEXT;
2758}
2759impl Default for MavOdidDescType {
2760    fn default() -> Self {
2761        Self::DEFAULT
2762    }
2763}
2764#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2765#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2766#[cfg_attr(feature = "serde", serde(tag = "type"))]
2767#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2768#[repr(u32)]
2769pub enum MavOdidHeightRef {
2770    #[doc = "The height field is relative to the take-off location."]
2771    MAV_ODID_HEIGHT_REF_OVER_TAKEOFF = 0,
2772    #[doc = "The height field is relative to ground."]
2773    MAV_ODID_HEIGHT_REF_OVER_GROUND = 1,
2774}
2775impl MavOdidHeightRef {
2776    pub const DEFAULT: Self = Self::MAV_ODID_HEIGHT_REF_OVER_TAKEOFF;
2777}
2778impl Default for MavOdidHeightRef {
2779    fn default() -> Self {
2780        Self::DEFAULT
2781    }
2782}
2783#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2784#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2785#[cfg_attr(feature = "serde", serde(tag = "type"))]
2786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2787#[repr(u32)]
2788pub enum MavOdidHorAcc {
2789    #[doc = "The horizontal accuracy is unknown."]
2790    MAV_ODID_HOR_ACC_UNKNOWN = 0,
2791    #[doc = "The horizontal accuracy is smaller than 10 Nautical Miles. 18.52 km."]
2792    MAV_ODID_HOR_ACC_10NM = 1,
2793    #[doc = "The horizontal accuracy is smaller than 4 Nautical Miles. 7.408 km."]
2794    MAV_ODID_HOR_ACC_4NM = 2,
2795    #[doc = "The horizontal accuracy is smaller than 2 Nautical Miles. 3.704 km."]
2796    MAV_ODID_HOR_ACC_2NM = 3,
2797    #[doc = "The horizontal accuracy is smaller than 1 Nautical Miles. 1.852 km."]
2798    MAV_ODID_HOR_ACC_1NM = 4,
2799    #[doc = "The horizontal accuracy is smaller than 0.5 Nautical Miles. 926 m."]
2800    MAV_ODID_HOR_ACC_0_5NM = 5,
2801    #[doc = "The horizontal accuracy is smaller than 0.3 Nautical Miles. 555.6 m."]
2802    MAV_ODID_HOR_ACC_0_3NM = 6,
2803    #[doc = "The horizontal accuracy is smaller than 0.1 Nautical Miles. 185.2 m."]
2804    MAV_ODID_HOR_ACC_0_1NM = 7,
2805    #[doc = "The horizontal accuracy is smaller than 0.05 Nautical Miles. 92.6 m."]
2806    MAV_ODID_HOR_ACC_0_05NM = 8,
2807    #[doc = "The horizontal accuracy is smaller than 30 meter."]
2808    MAV_ODID_HOR_ACC_30_METER = 9,
2809    #[doc = "The horizontal accuracy is smaller than 10 meter."]
2810    MAV_ODID_HOR_ACC_10_METER = 10,
2811    #[doc = "The horizontal accuracy is smaller than 3 meter."]
2812    MAV_ODID_HOR_ACC_3_METER = 11,
2813    #[doc = "The horizontal accuracy is smaller than 1 meter."]
2814    MAV_ODID_HOR_ACC_1_METER = 12,
2815}
2816impl MavOdidHorAcc {
2817    pub const DEFAULT: Self = Self::MAV_ODID_HOR_ACC_UNKNOWN;
2818}
2819impl Default for MavOdidHorAcc {
2820    fn default() -> Self {
2821        Self::DEFAULT
2822    }
2823}
2824#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2825#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2826#[cfg_attr(feature = "serde", serde(tag = "type"))]
2827#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2828#[repr(u32)]
2829pub enum MavOdidIdType {
2830    #[doc = "No type defined."]
2831    MAV_ODID_ID_TYPE_NONE = 0,
2832    #[doc = "Manufacturer Serial Number (ANSI/CTA-2063 format)."]
2833    MAV_ODID_ID_TYPE_SERIAL_NUMBER = 1,
2834    #[doc = "CAA (Civil Aviation Authority) registered ID. Format: [ICAO Country Code].[CAA Assigned ID]."]
2835    MAV_ODID_ID_TYPE_CAA_REGISTRATION_ID = 2,
2836    #[doc = "UTM (Unmanned Traffic Management) assigned UUID (RFC4122)."]
2837    MAV_ODID_ID_TYPE_UTM_ASSIGNED_UUID = 3,
2838    #[doc = "A 20 byte ID for a specific flight/session. The exact ID type is indicated by the first byte of uas_id and these type values are managed by ICAO."]
2839    MAV_ODID_ID_TYPE_SPECIFIC_SESSION_ID = 4,
2840}
2841impl MavOdidIdType {
2842    pub const DEFAULT: Self = Self::MAV_ODID_ID_TYPE_NONE;
2843}
2844impl Default for MavOdidIdType {
2845    fn default() -> Self {
2846        Self::DEFAULT
2847    }
2848}
2849#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2850#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2851#[cfg_attr(feature = "serde", serde(tag = "type"))]
2852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2853#[repr(u32)]
2854pub enum MavOdidOperatorIdType {
2855    #[doc = "CAA (Civil Aviation Authority) registered operator ID."]
2856    MAV_ODID_OPERATOR_ID_TYPE_CAA = 0,
2857}
2858impl MavOdidOperatorIdType {
2859    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_ID_TYPE_CAA;
2860}
2861impl Default for MavOdidOperatorIdType {
2862    fn default() -> Self {
2863        Self::DEFAULT
2864    }
2865}
2866#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2867#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2868#[cfg_attr(feature = "serde", serde(tag = "type"))]
2869#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2870#[repr(u32)]
2871pub enum MavOdidOperatorLocationType {
2872    #[doc = "The location/altitude of the operator is the same as the take-off location."]
2873    MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF = 0,
2874    #[doc = "The location/altitude of the operator is dynamic. E.g. based on live GNSS data."]
2875    MAV_ODID_OPERATOR_LOCATION_TYPE_LIVE_GNSS = 1,
2876    #[doc = "The location/altitude of the operator are fixed values."]
2877    MAV_ODID_OPERATOR_LOCATION_TYPE_FIXED = 2,
2878}
2879impl MavOdidOperatorLocationType {
2880    pub const DEFAULT: Self = Self::MAV_ODID_OPERATOR_LOCATION_TYPE_TAKEOFF;
2881}
2882impl Default for MavOdidOperatorLocationType {
2883    fn default() -> Self {
2884        Self::DEFAULT
2885    }
2886}
2887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2889#[cfg_attr(feature = "serde", serde(tag = "type"))]
2890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2891#[repr(u32)]
2892pub enum MavOdidSpeedAcc {
2893    #[doc = "The speed accuracy is unknown."]
2894    MAV_ODID_SPEED_ACC_UNKNOWN = 0,
2895    #[doc = "The speed accuracy is smaller than 10 meters per second."]
2896    MAV_ODID_SPEED_ACC_10_METERS_PER_SECOND = 1,
2897    #[doc = "The speed accuracy is smaller than 3 meters per second."]
2898    MAV_ODID_SPEED_ACC_3_METERS_PER_SECOND = 2,
2899    #[doc = "The speed accuracy is smaller than 1 meters per second."]
2900    MAV_ODID_SPEED_ACC_1_METERS_PER_SECOND = 3,
2901    #[doc = "The speed accuracy is smaller than 0.3 meters per second."]
2902    MAV_ODID_SPEED_ACC_0_3_METERS_PER_SECOND = 4,
2903}
2904impl MavOdidSpeedAcc {
2905    pub const DEFAULT: Self = Self::MAV_ODID_SPEED_ACC_UNKNOWN;
2906}
2907impl Default for MavOdidSpeedAcc {
2908    fn default() -> Self {
2909        Self::DEFAULT
2910    }
2911}
2912#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2914#[cfg_attr(feature = "serde", serde(tag = "type"))]
2915#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2916#[repr(u32)]
2917pub enum MavOdidStatus {
2918    #[doc = "The status of the (UA) Unmanned Aircraft is undefined."]
2919    MAV_ODID_STATUS_UNDECLARED = 0,
2920    #[doc = "The UA is on the ground."]
2921    MAV_ODID_STATUS_GROUND = 1,
2922    #[doc = "The UA is in the air."]
2923    MAV_ODID_STATUS_AIRBORNE = 2,
2924    #[doc = "The UA is having an emergency."]
2925    MAV_ODID_STATUS_EMERGENCY = 3,
2926    #[doc = "The remote ID system is failing or unreliable in some way."]
2927    MAV_ODID_STATUS_REMOTE_ID_SYSTEM_FAILURE = 4,
2928}
2929impl MavOdidStatus {
2930    pub const DEFAULT: Self = Self::MAV_ODID_STATUS_UNDECLARED;
2931}
2932impl Default for MavOdidStatus {
2933    fn default() -> Self {
2934        Self::DEFAULT
2935    }
2936}
2937#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2939#[cfg_attr(feature = "serde", serde(tag = "type"))]
2940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2941#[repr(u32)]
2942pub enum MavOdidTimeAcc {
2943    #[doc = "The timestamp accuracy is unknown."]
2944    MAV_ODID_TIME_ACC_UNKNOWN = 0,
2945    #[doc = "The timestamp accuracy is smaller than or equal to 0.1 second."]
2946    MAV_ODID_TIME_ACC_0_1_SECOND = 1,
2947    #[doc = "The timestamp accuracy is smaller than or equal to 0.2 second."]
2948    MAV_ODID_TIME_ACC_0_2_SECOND = 2,
2949    #[doc = "The timestamp accuracy is smaller than or equal to 0.3 second."]
2950    MAV_ODID_TIME_ACC_0_3_SECOND = 3,
2951    #[doc = "The timestamp accuracy is smaller than or equal to 0.4 second."]
2952    MAV_ODID_TIME_ACC_0_4_SECOND = 4,
2953    #[doc = "The timestamp accuracy is smaller than or equal to 0.5 second."]
2954    MAV_ODID_TIME_ACC_0_5_SECOND = 5,
2955    #[doc = "The timestamp accuracy is smaller than or equal to 0.6 second."]
2956    MAV_ODID_TIME_ACC_0_6_SECOND = 6,
2957    #[doc = "The timestamp accuracy is smaller than or equal to 0.7 second."]
2958    MAV_ODID_TIME_ACC_0_7_SECOND = 7,
2959    #[doc = "The timestamp accuracy is smaller than or equal to 0.8 second."]
2960    MAV_ODID_TIME_ACC_0_8_SECOND = 8,
2961    #[doc = "The timestamp accuracy is smaller than or equal to 0.9 second."]
2962    MAV_ODID_TIME_ACC_0_9_SECOND = 9,
2963    #[doc = "The timestamp accuracy is smaller than or equal to 1.0 second."]
2964    MAV_ODID_TIME_ACC_1_0_SECOND = 10,
2965    #[doc = "The timestamp accuracy is smaller than or equal to 1.1 second."]
2966    MAV_ODID_TIME_ACC_1_1_SECOND = 11,
2967    #[doc = "The timestamp accuracy is smaller than or equal to 1.2 second."]
2968    MAV_ODID_TIME_ACC_1_2_SECOND = 12,
2969    #[doc = "The timestamp accuracy is smaller than or equal to 1.3 second."]
2970    MAV_ODID_TIME_ACC_1_3_SECOND = 13,
2971    #[doc = "The timestamp accuracy is smaller than or equal to 1.4 second."]
2972    MAV_ODID_TIME_ACC_1_4_SECOND = 14,
2973    #[doc = "The timestamp accuracy is smaller than or equal to 1.5 second."]
2974    MAV_ODID_TIME_ACC_1_5_SECOND = 15,
2975}
2976impl MavOdidTimeAcc {
2977    pub const DEFAULT: Self = Self::MAV_ODID_TIME_ACC_UNKNOWN;
2978}
2979impl Default for MavOdidTimeAcc {
2980    fn default() -> Self {
2981        Self::DEFAULT
2982    }
2983}
2984#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
2985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
2986#[cfg_attr(feature = "serde", serde(tag = "type"))]
2987#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
2988#[repr(u32)]
2989pub enum MavOdidUaType {
2990    #[doc = "No UA (Unmanned Aircraft) type defined."]
2991    MAV_ODID_UA_TYPE_NONE = 0,
2992    #[doc = "Aeroplane/Airplane. Fixed wing."]
2993    MAV_ODID_UA_TYPE_AEROPLANE = 1,
2994    #[doc = "Helicopter or multirotor."]
2995    MAV_ODID_UA_TYPE_HELICOPTER_OR_MULTIROTOR = 2,
2996    #[doc = "Gyroplane."]
2997    MAV_ODID_UA_TYPE_GYROPLANE = 3,
2998    #[doc = "VTOL (Vertical Take-Off and Landing). Fixed wing aircraft that can take off vertically."]
2999    MAV_ODID_UA_TYPE_HYBRID_LIFT = 4,
3000    #[doc = "Ornithopter."]
3001    MAV_ODID_UA_TYPE_ORNITHOPTER = 5,
3002    #[doc = "Glider."]
3003    MAV_ODID_UA_TYPE_GLIDER = 6,
3004    #[doc = "Kite."]
3005    MAV_ODID_UA_TYPE_KITE = 7,
3006    #[doc = "Free Balloon."]
3007    MAV_ODID_UA_TYPE_FREE_BALLOON = 8,
3008    #[doc = "Captive Balloon."]
3009    MAV_ODID_UA_TYPE_CAPTIVE_BALLOON = 9,
3010    #[doc = "Airship. E.g. a blimp."]
3011    MAV_ODID_UA_TYPE_AIRSHIP = 10,
3012    #[doc = "Free Fall/Parachute (unpowered)."]
3013    MAV_ODID_UA_TYPE_FREE_FALL_PARACHUTE = 11,
3014    #[doc = "Rocket."]
3015    MAV_ODID_UA_TYPE_ROCKET = 12,
3016    #[doc = "Tethered powered aircraft."]
3017    MAV_ODID_UA_TYPE_TETHERED_POWERED_AIRCRAFT = 13,
3018    #[doc = "Ground Obstacle."]
3019    MAV_ODID_UA_TYPE_GROUND_OBSTACLE = 14,
3020    #[doc = "Other type of aircraft not listed earlier."]
3021    MAV_ODID_UA_TYPE_OTHER = 15,
3022}
3023impl MavOdidUaType {
3024    pub const DEFAULT: Self = Self::MAV_ODID_UA_TYPE_NONE;
3025}
3026impl Default for MavOdidUaType {
3027    fn default() -> Self {
3028        Self::DEFAULT
3029    }
3030}
3031#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3033#[cfg_attr(feature = "serde", serde(tag = "type"))]
3034#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3035#[repr(u32)]
3036pub enum MavOdidVerAcc {
3037    #[doc = "The vertical accuracy is unknown."]
3038    MAV_ODID_VER_ACC_UNKNOWN = 0,
3039    #[doc = "The vertical accuracy is smaller than 150 meter."]
3040    MAV_ODID_VER_ACC_150_METER = 1,
3041    #[doc = "The vertical accuracy is smaller than 45 meter."]
3042    MAV_ODID_VER_ACC_45_METER = 2,
3043    #[doc = "The vertical accuracy is smaller than 25 meter."]
3044    MAV_ODID_VER_ACC_25_METER = 3,
3045    #[doc = "The vertical accuracy is smaller than 10 meter."]
3046    MAV_ODID_VER_ACC_10_METER = 4,
3047    #[doc = "The vertical accuracy is smaller than 3 meter."]
3048    MAV_ODID_VER_ACC_3_METER = 5,
3049    #[doc = "The vertical accuracy is smaller than 1 meter."]
3050    MAV_ODID_VER_ACC_1_METER = 6,
3051}
3052impl MavOdidVerAcc {
3053    pub const DEFAULT: Self = Self::MAV_ODID_VER_ACC_UNKNOWN;
3054}
3055impl Default for MavOdidVerAcc {
3056    fn default() -> Self {
3057        Self::DEFAULT
3058    }
3059}
3060#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3061#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3062#[cfg_attr(feature = "serde", serde(tag = "type"))]
3063#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3064#[repr(u32)]
3065#[doc = "Specifies the datatype of a MAVLink extended parameter."]
3066pub enum MavParamExtType {
3067    #[doc = "8-bit unsigned integer"]
3068    MAV_PARAM_EXT_TYPE_UINT8 = 1,
3069    #[doc = "8-bit signed integer"]
3070    MAV_PARAM_EXT_TYPE_INT8 = 2,
3071    #[doc = "16-bit unsigned integer"]
3072    MAV_PARAM_EXT_TYPE_UINT16 = 3,
3073    #[doc = "16-bit signed integer"]
3074    MAV_PARAM_EXT_TYPE_INT16 = 4,
3075    #[doc = "32-bit unsigned integer"]
3076    MAV_PARAM_EXT_TYPE_UINT32 = 5,
3077    #[doc = "32-bit signed integer"]
3078    MAV_PARAM_EXT_TYPE_INT32 = 6,
3079    #[doc = "64-bit unsigned integer"]
3080    MAV_PARAM_EXT_TYPE_UINT64 = 7,
3081    #[doc = "64-bit signed integer"]
3082    MAV_PARAM_EXT_TYPE_INT64 = 8,
3083    #[doc = "32-bit floating-point"]
3084    MAV_PARAM_EXT_TYPE_REAL32 = 9,
3085    #[doc = "64-bit floating-point"]
3086    MAV_PARAM_EXT_TYPE_REAL64 = 10,
3087    #[doc = "Custom Type"]
3088    MAV_PARAM_EXT_TYPE_CUSTOM = 11,
3089}
3090impl MavParamExtType {
3091    pub const DEFAULT: Self = Self::MAV_PARAM_EXT_TYPE_UINT8;
3092}
3093impl Default for MavParamExtType {
3094    fn default() -> Self {
3095        Self::DEFAULT
3096    }
3097}
3098#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3100#[cfg_attr(feature = "serde", serde(tag = "type"))]
3101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3102#[repr(u32)]
3103#[doc = "Specifies the datatype of a MAVLink parameter."]
3104pub enum MavParamType {
3105    #[doc = "8-bit unsigned integer"]
3106    MAV_PARAM_TYPE_UINT8 = 1,
3107    #[doc = "8-bit signed integer"]
3108    MAV_PARAM_TYPE_INT8 = 2,
3109    #[doc = "16-bit unsigned integer"]
3110    MAV_PARAM_TYPE_UINT16 = 3,
3111    #[doc = "16-bit signed integer"]
3112    MAV_PARAM_TYPE_INT16 = 4,
3113    #[doc = "32-bit unsigned integer"]
3114    MAV_PARAM_TYPE_UINT32 = 5,
3115    #[doc = "32-bit signed integer"]
3116    MAV_PARAM_TYPE_INT32 = 6,
3117    #[doc = "64-bit unsigned integer"]
3118    MAV_PARAM_TYPE_UINT64 = 7,
3119    #[doc = "64-bit signed integer"]
3120    MAV_PARAM_TYPE_INT64 = 8,
3121    #[doc = "32-bit floating-point"]
3122    MAV_PARAM_TYPE_REAL32 = 9,
3123    #[doc = "64-bit floating-point"]
3124    MAV_PARAM_TYPE_REAL64 = 10,
3125}
3126impl MavParamType {
3127    pub const DEFAULT: Self = Self::MAV_PARAM_TYPE_UINT8;
3128}
3129impl Default for MavParamType {
3130    fn default() -> Self {
3131        Self::DEFAULT
3132    }
3133}
3134bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Power supply status flags (bitmask)"] pub struct MavPowerStatus : u16 { # [doc = "main brick power supply valid"] const MAV_POWER_STATUS_BRICK_VALID = 1 ; # [doc = "main servo power supply valid for FMU"] const MAV_POWER_STATUS_SERVO_VALID = 2 ; # [doc = "USB power is connected"] const MAV_POWER_STATUS_USB_CONNECTED = 4 ; # [doc = "peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_OVERCURRENT = 8 ; # [doc = "hi-power peripheral supply is in over-current state"] const MAV_POWER_STATUS_PERIPH_HIPOWER_OVERCURRENT = 16 ; # [doc = "Power status has changed since boot"] const MAV_POWER_STATUS_CHANGED = 32 ; } }
3135impl MavPowerStatus {
3136    pub const DEFAULT: Self = Self::MAV_POWER_STATUS_BRICK_VALID;
3137}
3138impl Default for MavPowerStatus {
3139    fn default() -> Self {
3140        Self::DEFAULT
3141    }
3142}
3143bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmask of (optional) autopilot capabilities (64 bit). If a bit is set, the autopilot supports this capability."] pub struct MavProtocolCapability : u64 { # [doc = "Autopilot supports the MISSION_ITEM float message type.           Note that MISSION_ITEM is deprecated, and autopilots should use MISSION_INT instead."] const MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT = 1 ; # [deprecated = " See `MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST` (Deprecated since 2022-03)"] # [doc = "Autopilot supports the new param float message type."] const MAV_PROTOCOL_CAPABILITY_PARAM_FLOAT = 2 ; # [doc = "Autopilot supports MISSION_ITEM_INT scaled integer message type.           Note that this flag must always be set if missions are supported, because missions must always use MISSION_ITEM_INT (rather than MISSION_ITEM, which is deprecated)."] const MAV_PROTOCOL_CAPABILITY_MISSION_INT = 4 ; # [doc = "Autopilot supports COMMAND_INT scaled integer message type."] const MAV_PROTOCOL_CAPABILITY_COMMAND_INT = 8 ; # [doc = "Parameter protocol uses byte-wise encoding of parameter values into param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE = 16 ; # [doc = "Autopilot supports the File Transfer Protocol v1: <https://mavlink.io/en/services/ftp.html>."] const MAV_PROTOCOL_CAPABILITY_FTP = 32 ; # [doc = "Autopilot supports commanding attitude offboard."] const MAV_PROTOCOL_CAPABILITY_SET_ATTITUDE_TARGET = 64 ; # [doc = "Autopilot supports commanding position and velocity targets in local NED frame."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_LOCAL_NED = 128 ; # [doc = "Autopilot supports commanding position and velocity targets in global scaled integers."] const MAV_PROTOCOL_CAPABILITY_SET_POSITION_TARGET_GLOBAL_INT = 256 ; # [doc = "Autopilot supports terrain protocol / data handling."] const MAV_PROTOCOL_CAPABILITY_TERRAIN = 512 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED3 = 1024 ; # [doc = "Autopilot supports the MAV_CMD_DO_FLIGHTTERMINATION command (flight termination)."] const MAV_PROTOCOL_CAPABILITY_FLIGHT_TERMINATION = 2048 ; # [doc = "Autopilot supports onboard compass calibration."] const MAV_PROTOCOL_CAPABILITY_COMPASS_CALIBRATION = 4096 ; # [doc = "Autopilot supports MAVLink version 2."] const MAV_PROTOCOL_CAPABILITY_MAVLINK2 = 8192 ; # [doc = "Autopilot supports mission fence protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_FENCE = 16384 ; # [doc = "Autopilot supports mission rally point protocol."] const MAV_PROTOCOL_CAPABILITY_MISSION_RALLY = 32768 ; # [doc = "Reserved for future use."] const MAV_PROTOCOL_CAPABILITY_RESERVED2 = 65536 ; # [doc = "Parameter protocol uses C-cast of parameter values to set the param_value (float) fields: <https://mavlink.io/en/services/parameter.html#parameter-encoding>.           Note that either this flag or MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_BYTEWISE should be set if the parameter protocol is supported."] const MAV_PROTOCOL_CAPABILITY_PARAM_ENCODE_C_CAST = 131072 ; # [doc = "This component implements/is a gimbal manager. This means the GIMBAL_MANAGER_INFORMATION, and other messages can be requested."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_IMPLEMENTS_GIMBAL_MANAGER = 262144 ; # [doc = "Component supports locking control to a particular GCS independent of its system (via MAV_CMD_REQUEST_OPERATOR_CONTROL)."] const MAV_PROTOCOL_CAPABILITY_COMPONENT_ACCEPTS_GCS_CONTROL = 524288 ; } }
3144impl MavProtocolCapability {
3145    pub const DEFAULT: Self = Self::MAV_PROTOCOL_CAPABILITY_MISSION_FLOAT;
3146}
3147impl Default for MavProtocolCapability {
3148    fn default() -> Self {
3149        Self::DEFAULT
3150    }
3151}
3152#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3153#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3154#[cfg_attr(feature = "serde", serde(tag = "type"))]
3155#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3156#[repr(u32)]
3157#[doc = "Result from a MAVLink command (MAV_CMD)"]
3158pub enum MavResult {
3159    #[doc = "Command is valid (is supported and has valid parameters), and was executed."]
3160    MAV_RESULT_ACCEPTED = 0,
3161    #[doc = "Command is valid, but cannot be executed at this time. This is used to indicate a problem that should be fixed just by waiting (e.g. a state machine is busy, can't arm because have not got GPS lock, etc.). Retrying later should work."]
3162    MAV_RESULT_TEMPORARILY_REJECTED = 1,
3163    #[doc = "Command is invalid (is supported but has invalid parameters). Retrying same command and parameters will not work."]
3164    MAV_RESULT_DENIED = 2,
3165    #[doc = "Command is not supported (unknown)."]
3166    MAV_RESULT_UNSUPPORTED = 3,
3167    #[doc = "Command is valid, but execution has failed. This is used to indicate any non-temporary or unexpected problem, i.e. any problem that must be fixed before the command can succeed/be retried. For example, attempting to write a file when out of memory, attempting to arm when sensors are not calibrated, etc."]
3168    MAV_RESULT_FAILED = 4,
3169    #[doc = "Command is valid and is being executed. This will be followed by further progress updates, i.e. the component may send further COMMAND_ACK messages with result MAV_RESULT_IN_PROGRESS (at a rate decided by the implementation), and must terminate by sending a COMMAND_ACK message with final result of the operation. The COMMAND_ACK.progress field can be used to indicate the progress of the operation."]
3170    MAV_RESULT_IN_PROGRESS = 5,
3171    #[doc = "Command has been cancelled (as a result of receiving a COMMAND_CANCEL message)."]
3172    MAV_RESULT_CANCELLED = 6,
3173    #[doc = "Command is only accepted when sent as a COMMAND_LONG."]
3174    MAV_RESULT_COMMAND_LONG_ONLY = 7,
3175    #[doc = "Command is only accepted when sent as a COMMAND_INT."]
3176    MAV_RESULT_COMMAND_INT_ONLY = 8,
3177    #[doc = "Command is invalid because a frame is required and the specified frame is not supported."]
3178    MAV_RESULT_COMMAND_UNSUPPORTED_MAV_FRAME = 9,
3179}
3180impl MavResult {
3181    pub const DEFAULT: Self = Self::MAV_RESULT_ACCEPTED;
3182}
3183impl Default for MavResult {
3184    fn default() -> Self {
3185        Self::DEFAULT
3186    }
3187}
3188#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3190#[cfg_attr(feature = "serde", serde(tag = "type"))]
3191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3192#[repr(u32)]
3193#[deprecated = " See `MAV_CMD_DO_SET_ROI_*` (Deprecated since 2018-01)"]
3194#[doc = "The ROI (region of interest) for the vehicle. This can be                 be used by the vehicle for camera/vehicle attitude alignment (see                 MAV_CMD_NAV_ROI)."]
3195pub enum MavRoi {
3196    #[doc = "No region of interest."]
3197    MAV_ROI_NONE = 0,
3198    #[doc = "Point toward next waypoint, with optional pitch/roll/yaw offset."]
3199    MAV_ROI_WPNEXT = 1,
3200    #[doc = "Point toward given waypoint."]
3201    MAV_ROI_WPINDEX = 2,
3202    #[doc = "Point toward fixed location."]
3203    MAV_ROI_LOCATION = 3,
3204    #[doc = "Point toward of given id."]
3205    MAV_ROI_TARGET = 4,
3206}
3207impl MavRoi {
3208    pub const DEFAULT: Self = Self::MAV_ROI_NONE;
3209}
3210impl Default for MavRoi {
3211    fn default() -> Self {
3212        Self::DEFAULT
3213    }
3214}
3215#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3217#[cfg_attr(feature = "serde", serde(tag = "type"))]
3218#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3219#[repr(u32)]
3220#[doc = "Enumeration of sensor orientation, according to its rotations"]
3221pub enum MavSensorOrientation {
3222    #[doc = "Roll: 0, Pitch: 0, Yaw: 0"]
3223    MAV_SENSOR_ROTATION_NONE = 0,
3224    #[doc = "Roll: 0, Pitch: 0, Yaw: 45"]
3225    MAV_SENSOR_ROTATION_YAW_45 = 1,
3226    #[doc = "Roll: 0, Pitch: 0, Yaw: 90"]
3227    MAV_SENSOR_ROTATION_YAW_90 = 2,
3228    #[doc = "Roll: 0, Pitch: 0, Yaw: 135"]
3229    MAV_SENSOR_ROTATION_YAW_135 = 3,
3230    #[doc = "Roll: 0, Pitch: 0, Yaw: 180"]
3231    MAV_SENSOR_ROTATION_YAW_180 = 4,
3232    #[doc = "Roll: 0, Pitch: 0, Yaw: 225"]
3233    MAV_SENSOR_ROTATION_YAW_225 = 5,
3234    #[doc = "Roll: 0, Pitch: 0, Yaw: 270"]
3235    MAV_SENSOR_ROTATION_YAW_270 = 6,
3236    #[doc = "Roll: 0, Pitch: 0, Yaw: 315"]
3237    MAV_SENSOR_ROTATION_YAW_315 = 7,
3238    #[doc = "Roll: 180, Pitch: 0, Yaw: 0"]
3239    MAV_SENSOR_ROTATION_ROLL_180 = 8,
3240    #[doc = "Roll: 180, Pitch: 0, Yaw: 45"]
3241    MAV_SENSOR_ROTATION_ROLL_180_YAW_45 = 9,
3242    #[doc = "Roll: 180, Pitch: 0, Yaw: 90"]
3243    MAV_SENSOR_ROTATION_ROLL_180_YAW_90 = 10,
3244    #[doc = "Roll: 180, Pitch: 0, Yaw: 135"]
3245    MAV_SENSOR_ROTATION_ROLL_180_YAW_135 = 11,
3246    #[doc = "Roll: 0, Pitch: 180, Yaw: 0"]
3247    MAV_SENSOR_ROTATION_PITCH_180 = 12,
3248    #[doc = "Roll: 180, Pitch: 0, Yaw: 225"]
3249    MAV_SENSOR_ROTATION_ROLL_180_YAW_225 = 13,
3250    #[doc = "Roll: 180, Pitch: 0, Yaw: 270"]
3251    MAV_SENSOR_ROTATION_ROLL_180_YAW_270 = 14,
3252    #[doc = "Roll: 180, Pitch: 0, Yaw: 315"]
3253    MAV_SENSOR_ROTATION_ROLL_180_YAW_315 = 15,
3254    #[doc = "Roll: 90, Pitch: 0, Yaw: 0"]
3255    MAV_SENSOR_ROTATION_ROLL_90 = 16,
3256    #[doc = "Roll: 90, Pitch: 0, Yaw: 45"]
3257    MAV_SENSOR_ROTATION_ROLL_90_YAW_45 = 17,
3258    #[doc = "Roll: 90, Pitch: 0, Yaw: 90"]
3259    MAV_SENSOR_ROTATION_ROLL_90_YAW_90 = 18,
3260    #[doc = "Roll: 90, Pitch: 0, Yaw: 135"]
3261    MAV_SENSOR_ROTATION_ROLL_90_YAW_135 = 19,
3262    #[doc = "Roll: 270, Pitch: 0, Yaw: 0"]
3263    MAV_SENSOR_ROTATION_ROLL_270 = 20,
3264    #[doc = "Roll: 270, Pitch: 0, Yaw: 45"]
3265    MAV_SENSOR_ROTATION_ROLL_270_YAW_45 = 21,
3266    #[doc = "Roll: 270, Pitch: 0, Yaw: 90"]
3267    MAV_SENSOR_ROTATION_ROLL_270_YAW_90 = 22,
3268    #[doc = "Roll: 270, Pitch: 0, Yaw: 135"]
3269    MAV_SENSOR_ROTATION_ROLL_270_YAW_135 = 23,
3270    #[doc = "Roll: 0, Pitch: 90, Yaw: 0"]
3271    MAV_SENSOR_ROTATION_PITCH_90 = 24,
3272    #[doc = "Roll: 0, Pitch: 270, Yaw: 0"]
3273    MAV_SENSOR_ROTATION_PITCH_270 = 25,
3274    #[doc = "Roll: 0, Pitch: 180, Yaw: 90"]
3275    MAV_SENSOR_ROTATION_PITCH_180_YAW_90 = 26,
3276    #[doc = "Roll: 0, Pitch: 180, Yaw: 270"]
3277    MAV_SENSOR_ROTATION_PITCH_180_YAW_270 = 27,
3278    #[doc = "Roll: 90, Pitch: 90, Yaw: 0"]
3279    MAV_SENSOR_ROTATION_ROLL_90_PITCH_90 = 28,
3280    #[doc = "Roll: 180, Pitch: 90, Yaw: 0"]
3281    MAV_SENSOR_ROTATION_ROLL_180_PITCH_90 = 29,
3282    #[doc = "Roll: 270, Pitch: 90, Yaw: 0"]
3283    MAV_SENSOR_ROTATION_ROLL_270_PITCH_90 = 30,
3284    #[doc = "Roll: 90, Pitch: 180, Yaw: 0"]
3285    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180 = 31,
3286    #[doc = "Roll: 270, Pitch: 180, Yaw: 0"]
3287    MAV_SENSOR_ROTATION_ROLL_270_PITCH_180 = 32,
3288    #[doc = "Roll: 90, Pitch: 270, Yaw: 0"]
3289    MAV_SENSOR_ROTATION_ROLL_90_PITCH_270 = 33,
3290    #[doc = "Roll: 180, Pitch: 270, Yaw: 0"]
3291    MAV_SENSOR_ROTATION_ROLL_180_PITCH_270 = 34,
3292    #[doc = "Roll: 270, Pitch: 270, Yaw: 0"]
3293    MAV_SENSOR_ROTATION_ROLL_270_PITCH_270 = 35,
3294    #[doc = "Roll: 90, Pitch: 180, Yaw: 90"]
3295    MAV_SENSOR_ROTATION_ROLL_90_PITCH_180_YAW_90 = 36,
3296    #[doc = "Roll: 90, Pitch: 0, Yaw: 270"]
3297    MAV_SENSOR_ROTATION_ROLL_90_YAW_270 = 37,
3298    #[doc = "Roll: 90, Pitch: 68, Yaw: 293"]
3299    MAV_SENSOR_ROTATION_ROLL_90_PITCH_68_YAW_293 = 38,
3300    #[doc = "Pitch: 315"]
3301    MAV_SENSOR_ROTATION_PITCH_315 = 39,
3302    #[doc = "Roll: 90, Pitch: 315"]
3303    MAV_SENSOR_ROTATION_ROLL_90_PITCH_315 = 40,
3304    #[doc = "Custom orientation"]
3305    MAV_SENSOR_ROTATION_CUSTOM = 100,
3306}
3307impl MavSensorOrientation {
3308    pub const DEFAULT: Self = Self::MAV_SENSOR_ROTATION_NONE;
3309}
3310impl Default for MavSensorOrientation {
3311    fn default() -> Self {
3312        Self::DEFAULT
3313    }
3314}
3315#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3317#[cfg_attr(feature = "serde", serde(tag = "type"))]
3318#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3319#[repr(u32)]
3320#[doc = "Indicates the severity level, generally used for status messages to indicate their relative urgency. Based on RFC-5424 using expanded definitions at: <http://www.kiwisyslog.com/kb/info:-syslog-message-levels/>."]
3321pub enum MavSeverity {
3322    #[doc = "System is unusable. This is a \"panic\" condition."]
3323    MAV_SEVERITY_EMERGENCY = 0,
3324    #[doc = "Action should be taken immediately. Indicates error in non-critical systems."]
3325    MAV_SEVERITY_ALERT = 1,
3326    #[doc = "Action must be taken immediately. Indicates failure in a primary system."]
3327    MAV_SEVERITY_CRITICAL = 2,
3328    #[doc = "Indicates an error in secondary/redundant systems."]
3329    MAV_SEVERITY_ERROR = 3,
3330    #[doc = "Indicates about a possible future error if this is not resolved within a given timeframe. Example would be a low battery warning."]
3331    MAV_SEVERITY_WARNING = 4,
3332    #[doc = "An unusual event has occurred, though not an error condition. This should be investigated for the root cause."]
3333    MAV_SEVERITY_NOTICE = 5,
3334    #[doc = "Normal operational messages. Useful for logging. No action is required for these messages."]
3335    MAV_SEVERITY_INFO = 6,
3336    #[doc = "Useful non-operational messages that can assist in debugging. These should not occur during normal operation."]
3337    MAV_SEVERITY_DEBUG = 7,
3338}
3339impl MavSeverity {
3340    pub const DEFAULT: Self = Self::MAV_SEVERITY_EMERGENCY;
3341}
3342impl Default for MavSeverity {
3343    fn default() -> Self {
3344        Self::DEFAULT
3345    }
3346}
3347#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3348#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3349#[cfg_attr(feature = "serde", serde(tag = "type"))]
3350#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3351#[repr(u32)]
3352#[doc = "Standard modes with a well understood meaning across flight stacks and vehicle types.         For example, most flight stack have the concept of a \"return\" or \"RTL\" mode that takes a vehicle to safety, even though the precise mechanics of this mode may differ.         The modes supported by a flight stack can be queried using AVAILABLE_MODES and set using MAV_CMD_DO_SET_STANDARD_MODE.         The current mode is streamed in CURRENT_MODE.         See <https://mavlink.io/en/services/standard_modes.html>"]
3353pub enum MavStandardMode {
3354    #[doc = "Non standard mode.           This may be used when reporting the mode if the current flight mode is not a standard mode."]
3355    MAV_STANDARD_MODE_NON_STANDARD = 0,
3356    #[doc = "Position mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold both position and altitude against wind and external forces.           This mode can only be set by vehicles that can hold a fixed position.           Multicopter (MC) vehicles actively brake and hold both position and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to multicopter mode (if needed) but otherwise behave in the same way as MC vehicles.           Fixed-wing (FW) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3357    MAV_STANDARD_MODE_POSITION_HOLD = 1,
3358    #[doc = "Orbit (manual).           Position-controlled and stabilized manual mode.           The vehicle circles around a fixed setpoint in the horizontal plane at a particular radius, altitude, and direction.           Flight stacks may further allow manual control over the setpoint position, radius, direction, speed, and/or altitude of the circle, but this is not mandated.           Flight stacks may support the [MAV_CMD_DO_ORBIT](<https://mavlink.io/en/messages/common.html#MAV_CMD_DO_ORBIT>) for changing the orbit parameters.           MC and FW vehicles may support this mode.           Hybrid MC/FW (\"VTOL\") vehicles may support this mode in MC/FW or both modes; if the mode is not supported by the current configuration the vehicle should transition to the supported configuration.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3359    MAV_STANDARD_MODE_ORBIT = 2,
3360    #[doc = "Cruise mode (manual).           Position-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their original track against wind and external forces.           Fixed-wing (FW) vehicles level orientation and maintain current track and altitude against wind and external forces.           Hybrid MC/FW (\"VTOL\") vehicles first transition to FW mode (if needed) but otherwise behave in the same way as MC vehicles.           Multicopter (MC) vehicles must not support this mode.           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3361    MAV_STANDARD_MODE_CRUISE = 3,
3362    #[doc = "Altitude hold (manual).           Altitude-controlled and stabilized manual mode.           When sticks are released vehicles return to their level-flight orientation and hold their altitude.           MC vehicles continue with existing momentum and may move with wind (or other external forces).           FW vehicles continue with current heading, but may be moved off-track by wind.           Hybrid MC/FW (\"VTOL\") vehicles behave according to their current configuration/mode (FW or MC).           Other vehicle types must not support this mode (this may be revisited through the PR process)."]
3363    MAV_STANDARD_MODE_ALTITUDE_HOLD = 4,
3364    #[doc = "Safe recovery mode (auto).           Automatic mode that takes vehicle to a predefined safe location via a safe flight path, and may also automatically land the vehicle.           This mode is more commonly referred to as RTL and/or or Smart RTL.           The precise return location, flight path, and landing behaviour depend on vehicle configuration and type.           For example, the vehicle might return to the home/launch location, a rally point, or the start of a mission landing, it might follow a direct path, mission path, or breadcrumb path, and land using a mission landing pattern or some other kind of descent."]
3365    MAV_STANDARD_MODE_SAFE_RECOVERY = 5,
3366    #[doc = "Mission mode (automatic).           Automatic mode that executes MAVLink missions.           Missions are executed from the current waypoint as soon as the mode is enabled."]
3367    MAV_STANDARD_MODE_MISSION = 6,
3368    #[doc = "Land mode (auto).           Automatic mode that lands the vehicle at the current location.           The precise landing behaviour depends on vehicle configuration and type."]
3369    MAV_STANDARD_MODE_LAND = 7,
3370    #[doc = "Takeoff mode (auto).           Automatic takeoff mode.           The precise takeoff behaviour depends on vehicle configuration and type."]
3371    MAV_STANDARD_MODE_TAKEOFF = 8,
3372}
3373impl MavStandardMode {
3374    pub const DEFAULT: Self = Self::MAV_STANDARD_MODE_NON_STANDARD;
3375}
3376impl Default for MavStandardMode {
3377    fn default() -> Self {
3378        Self::DEFAULT
3379    }
3380}
3381#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3382#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3383#[cfg_attr(feature = "serde", serde(tag = "type"))]
3384#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3385#[repr(u32)]
3386pub enum MavState {
3387    #[doc = "Uninitialized system, state is unknown."]
3388    MAV_STATE_UNINIT = 0,
3389    #[doc = "System is booting up."]
3390    MAV_STATE_BOOT = 1,
3391    #[doc = "System is calibrating and not flight-ready."]
3392    MAV_STATE_CALIBRATING = 2,
3393    #[doc = "System is grounded and on standby. It can be launched any time."]
3394    MAV_STATE_STANDBY = 3,
3395    #[doc = "System is active and might be already airborne. Motors are engaged."]
3396    MAV_STATE_ACTIVE = 4,
3397    #[doc = "System is in a non-normal flight mode (failsafe). It can however still navigate."]
3398    MAV_STATE_CRITICAL = 5,
3399    #[doc = "System is in a non-normal flight mode (failsafe). It lost control over parts or over the whole airframe. It is in mayday and going down."]
3400    MAV_STATE_EMERGENCY = 6,
3401    #[doc = "System just initialized its power-down sequence, will shut down now."]
3402    MAV_STATE_POWEROFF = 7,
3403    #[doc = "System is terminating itself (failsafe or commanded)."]
3404    MAV_STATE_FLIGHT_TERMINATION = 8,
3405}
3406impl MavState {
3407    pub const DEFAULT: Self = Self::MAV_STATE_UNINIT;
3408}
3409impl Default for MavState {
3410    fn default() -> Self {
3411        Self::DEFAULT
3412    }
3413}
3414bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message."] pub struct MavSysStatusSensor : u32 { # [doc = "0x01 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO = 1 ; # [doc = "0x02 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL = 2 ; # [doc = "0x04 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG = 4 ; # [doc = "0x08 absolute pressure"] const MAV_SYS_STATUS_SENSOR_ABSOLUTE_PRESSURE = 8 ; # [doc = "0x10 differential pressure"] const MAV_SYS_STATUS_SENSOR_DIFFERENTIAL_PRESSURE = 16 ; # [doc = "0x20 GPS"] const MAV_SYS_STATUS_SENSOR_GPS = 32 ; # [doc = "0x40 optical flow"] const MAV_SYS_STATUS_SENSOR_OPTICAL_FLOW = 64 ; # [doc = "0x80 computer vision position"] const MAV_SYS_STATUS_SENSOR_VISION_POSITION = 128 ; # [doc = "0x100 laser based position"] const MAV_SYS_STATUS_SENSOR_LASER_POSITION = 256 ; # [doc = "0x200 external ground truth (Vicon or Leica)"] const MAV_SYS_STATUS_SENSOR_EXTERNAL_GROUND_TRUTH = 512 ; # [doc = "0x400 3D angular rate control"] const MAV_SYS_STATUS_SENSOR_ANGULAR_RATE_CONTROL = 1024 ; # [doc = "0x800 attitude stabilization"] const MAV_SYS_STATUS_SENSOR_ATTITUDE_STABILIZATION = 2048 ; # [doc = "0x1000 yaw position"] const MAV_SYS_STATUS_SENSOR_YAW_POSITION = 4096 ; # [doc = "0x2000 z/altitude control"] const MAV_SYS_STATUS_SENSOR_Z_ALTITUDE_CONTROL = 8192 ; # [doc = "0x4000 x/y position control"] const MAV_SYS_STATUS_SENSOR_XY_POSITION_CONTROL = 16384 ; # [doc = "0x8000 motor outputs / control"] const MAV_SYS_STATUS_SENSOR_MOTOR_OUTPUTS = 32768 ; # [doc = "0x10000 RC receiver"] const MAV_SYS_STATUS_SENSOR_RC_RECEIVER = 65536 ; # [doc = "0x20000 2nd 3D gyro"] const MAV_SYS_STATUS_SENSOR_3D_GYRO2 = 131072 ; # [doc = "0x40000 2nd 3D accelerometer"] const MAV_SYS_STATUS_SENSOR_3D_ACCEL2 = 262144 ; # [doc = "0x80000 2nd 3D magnetometer"] const MAV_SYS_STATUS_SENSOR_3D_MAG2 = 524288 ; # [doc = "0x100000 geofence"] const MAV_SYS_STATUS_GEOFENCE = 1048576 ; # [doc = "0x200000 AHRS subsystem health"] const MAV_SYS_STATUS_AHRS = 2097152 ; # [doc = "0x400000 Terrain subsystem health"] const MAV_SYS_STATUS_TERRAIN = 4194304 ; # [doc = "0x800000 Motors are reversed"] const MAV_SYS_STATUS_REVERSE_MOTOR = 8388608 ; # [doc = "0x1000000 Logging"] const MAV_SYS_STATUS_LOGGING = 16777216 ; # [doc = "0x2000000 Battery"] const MAV_SYS_STATUS_SENSOR_BATTERY = 33554432 ; # [doc = "0x4000000 Proximity"] const MAV_SYS_STATUS_SENSOR_PROXIMITY = 67108864 ; # [doc = "0x8000000 Satellite Communication"] const MAV_SYS_STATUS_SENSOR_SATCOM = 134217728 ; # [doc = "0x10000000 pre-arm check status. Always healthy when armed"] const MAV_SYS_STATUS_PREARM_CHECK = 268435456 ; # [doc = "0x20000000 Avoidance/collision prevention"] const MAV_SYS_STATUS_OBSTACLE_AVOIDANCE = 536870912 ; # [doc = "0x40000000 propulsion (actuator, esc, motor or propellor)"] const MAV_SYS_STATUS_SENSOR_PROPULSION = 1073741824 ; # [doc = "0x80000000 Extended bit-field are used for further sensor status bits (needs to be set in onboard_control_sensors_present only)"] const MAV_SYS_STATUS_EXTENSION_USED = 2147483648 ; } }
3415impl MavSysStatusSensor {
3416    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_SENSOR_3D_GYRO;
3417}
3418impl Default for MavSysStatusSensor {
3419    fn default() -> Self {
3420        Self::DEFAULT
3421    }
3422}
3423bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "These encode the sensors whose status is sent as part of the SYS_STATUS message in the extended fields."] pub struct MavSysStatusSensorExtended : u32 { # [doc = "0x01 Recovery system (parachute, balloon, retracts etc)"] const MAV_SYS_STATUS_RECOVERY_SYSTEM = 1 ; } }
3424impl MavSysStatusSensorExtended {
3425    pub const DEFAULT: Self = Self::MAV_SYS_STATUS_RECOVERY_SYSTEM;
3426}
3427impl Default for MavSysStatusSensorExtended {
3428    fn default() -> Self {
3429        Self::DEFAULT
3430    }
3431}
3432#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3434#[cfg_attr(feature = "serde", serde(tag = "type"))]
3435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3436#[repr(u32)]
3437pub enum MavTunnelPayloadType {
3438    #[doc = "Encoding of payload unknown."]
3439    MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN = 0,
3440    #[doc = "Registered for STorM32 gimbal controller."]
3441    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED0 = 200,
3442    #[doc = "Registered for STorM32 gimbal controller."]
3443    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED1 = 201,
3444    #[doc = "Registered for STorM32 gimbal controller."]
3445    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED2 = 202,
3446    #[doc = "Registered for STorM32 gimbal controller."]
3447    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED3 = 203,
3448    #[doc = "Registered for STorM32 gimbal controller."]
3449    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED4 = 204,
3450    #[doc = "Registered for STorM32 gimbal controller."]
3451    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED5 = 205,
3452    #[doc = "Registered for STorM32 gimbal controller."]
3453    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED6 = 206,
3454    #[doc = "Registered for STorM32 gimbal controller."]
3455    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED7 = 207,
3456    #[doc = "Registered for STorM32 gimbal controller."]
3457    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED8 = 208,
3458    #[doc = "Registered for STorM32 gimbal controller."]
3459    MAV_TUNNEL_PAYLOAD_TYPE_STORM32_RESERVED9 = 209,
3460    #[doc = "Registered for ModalAI remote OSD protocol."]
3461    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_REMOTE_OSD = 210,
3462    #[doc = "Registered for ModalAI ESC UART passthru protocol."]
3463    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_ESC_UART_PASSTHRU = 211,
3464    #[doc = "Registered for ModalAI vendor use."]
3465    MAV_TUNNEL_PAYLOAD_TYPE_MODALAI_IO_UART_PASSTHRU = 212,
3466}
3467impl MavTunnelPayloadType {
3468    pub const DEFAULT: Self = Self::MAV_TUNNEL_PAYLOAD_TYPE_UNKNOWN;
3469}
3470impl Default for MavTunnelPayloadType {
3471    fn default() -> Self {
3472        Self::DEFAULT
3473    }
3474}
3475#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3476#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3477#[cfg_attr(feature = "serde", serde(tag = "type"))]
3478#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3479#[repr(u32)]
3480#[doc = "MAVLINK component type reported in HEARTBEAT message. Flight controllers must report the type of the vehicle on which they are mounted (e.g. MAV_TYPE_OCTOROTOR). All other components must report a value appropriate for their type (e.g. a camera must use MAV_TYPE_CAMERA)."]
3481pub enum MavType {
3482    #[doc = "Generic micro air vehicle"]
3483    MAV_TYPE_GENERIC = 0,
3484    #[doc = "Fixed wing aircraft."]
3485    MAV_TYPE_FIXED_WING = 1,
3486    #[doc = "Quadrotor"]
3487    MAV_TYPE_QUADROTOR = 2,
3488    #[doc = "Coaxial helicopter"]
3489    MAV_TYPE_COAXIAL = 3,
3490    #[doc = "Normal helicopter with tail rotor."]
3491    MAV_TYPE_HELICOPTER = 4,
3492    #[doc = "Ground installation"]
3493    MAV_TYPE_ANTENNA_TRACKER = 5,
3494    #[doc = "Operator control unit / ground control station"]
3495    MAV_TYPE_GCS = 6,
3496    #[doc = "Airship, controlled"]
3497    MAV_TYPE_AIRSHIP = 7,
3498    #[doc = "Free balloon, uncontrolled"]
3499    MAV_TYPE_FREE_BALLOON = 8,
3500    #[doc = "Rocket"]
3501    MAV_TYPE_ROCKET = 9,
3502    #[doc = "Ground rover"]
3503    MAV_TYPE_GROUND_ROVER = 10,
3504    #[doc = "Surface vessel, boat, ship"]
3505    MAV_TYPE_SURFACE_BOAT = 11,
3506    #[doc = "Submarine"]
3507    MAV_TYPE_SUBMARINE = 12,
3508    #[doc = "Hexarotor"]
3509    MAV_TYPE_HEXAROTOR = 13,
3510    #[doc = "Octorotor"]
3511    MAV_TYPE_OCTOROTOR = 14,
3512    #[doc = "Tricopter"]
3513    MAV_TYPE_TRICOPTER = 15,
3514    #[doc = "Flapping wing"]
3515    MAV_TYPE_FLAPPING_WING = 16,
3516    #[doc = "Kite"]
3517    MAV_TYPE_KITE = 17,
3518    #[doc = "Onboard companion controller"]
3519    MAV_TYPE_ONBOARD_CONTROLLER = 18,
3520    #[doc = "Two-rotor Tailsitter VTOL that additionally uses control surfaces in vertical operation. Note, value previously named MAV_TYPE_VTOL_DUOROTOR."]
3521    MAV_TYPE_VTOL_TAILSITTER_DUOROTOR = 19,
3522    #[doc = "Quad-rotor Tailsitter VTOL using a V-shaped quad config in vertical operation. Note: value previously named MAV_TYPE_VTOL_QUADROTOR."]
3523    MAV_TYPE_VTOL_TAILSITTER_QUADROTOR = 20,
3524    #[doc = "Tiltrotor VTOL. Fuselage and wings stay (nominally) horizontal in all flight phases. It able to tilt (some) rotors to provide thrust in cruise flight."]
3525    MAV_TYPE_VTOL_TILTROTOR = 21,
3526    #[doc = "VTOL with separate fixed rotors for hover and cruise flight. Fuselage and wings stay (nominally) horizontal in all flight phases."]
3527    MAV_TYPE_VTOL_FIXEDROTOR = 22,
3528    #[doc = "Tailsitter VTOL. Fuselage and wings orientation changes depending on flight phase: vertical for hover, horizontal for cruise. Use more specific VTOL MAV_TYPE_VTOL_TAILSITTER_DUOROTOR or MAV_TYPE_VTOL_TAILSITTER_QUADROTOR if appropriate."]
3529    MAV_TYPE_VTOL_TAILSITTER = 23,
3530    #[doc = "Tiltwing VTOL. Fuselage stays horizontal in all flight phases. The whole wing, along with any attached engine, can tilt between vertical and horizontal mode."]
3531    MAV_TYPE_VTOL_TILTWING = 24,
3532    #[doc = "VTOL reserved 5"]
3533    MAV_TYPE_VTOL_RESERVED5 = 25,
3534    #[doc = "Gimbal"]
3535    MAV_TYPE_GIMBAL = 26,
3536    #[doc = "ADSB system"]
3537    MAV_TYPE_ADSB = 27,
3538    #[doc = "Steerable, nonrigid airfoil"]
3539    MAV_TYPE_PARAFOIL = 28,
3540    #[doc = "Dodecarotor"]
3541    MAV_TYPE_DODECAROTOR = 29,
3542    #[doc = "Camera"]
3543    MAV_TYPE_CAMERA = 30,
3544    #[doc = "Charging station"]
3545    MAV_TYPE_CHARGING_STATION = 31,
3546    #[doc = "FLARM collision avoidance system"]
3547    MAV_TYPE_FLARM = 32,
3548    #[doc = "Servo"]
3549    MAV_TYPE_SERVO = 33,
3550    #[doc = "Open Drone ID. See <https://mavlink.io/en/services/opendroneid.html>."]
3551    MAV_TYPE_ODID = 34,
3552    #[doc = "Decarotor"]
3553    MAV_TYPE_DECAROTOR = 35,
3554    #[doc = "Battery"]
3555    MAV_TYPE_BATTERY = 36,
3556    #[doc = "Parachute"]
3557    MAV_TYPE_PARACHUTE = 37,
3558    #[doc = "Log"]
3559    MAV_TYPE_LOG = 38,
3560    #[doc = "OSD"]
3561    MAV_TYPE_OSD = 39,
3562    #[doc = "IMU"]
3563    MAV_TYPE_IMU = 40,
3564    #[doc = "GPS"]
3565    MAV_TYPE_GPS = 41,
3566    #[doc = "Winch"]
3567    MAV_TYPE_WINCH = 42,
3568    #[doc = "Generic multirotor that does not fit into a specific type or whose type is unknown"]
3569    MAV_TYPE_GENERIC_MULTIROTOR = 43,
3570    #[doc = "Illuminator. An illuminator is a light source that is used for lighting up dark areas external to the sytstem: e.g. a torch or searchlight (as opposed to a light source for illuminating the system itself, e.g. an indicator light)."]
3571    MAV_TYPE_ILLUMINATOR = 44,
3572    #[doc = "Orbiter spacecraft. Includes satellites orbiting terrestrial and extra-terrestrial bodies. Follows NASA Spacecraft Classification."]
3573    MAV_TYPE_SPACECRAFT_ORBITER = 45,
3574}
3575impl MavType {
3576    pub const DEFAULT: Self = Self::MAV_TYPE_GENERIC;
3577}
3578impl Default for MavType {
3579    fn default() -> Self {
3580        Self::DEFAULT
3581    }
3582}
3583#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3584#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3585#[cfg_attr(feature = "serde", serde(tag = "type"))]
3586#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3587#[repr(u32)]
3588#[doc = "Enumeration of VTOL states"]
3589pub enum MavVtolState {
3590    #[doc = "MAV is not configured as VTOL"]
3591    MAV_VTOL_STATE_UNDEFINED = 0,
3592    #[doc = "VTOL is in transition from multicopter to fixed-wing"]
3593    MAV_VTOL_STATE_TRANSITION_TO_FW = 1,
3594    #[doc = "VTOL is in transition from fixed-wing to multicopter"]
3595    MAV_VTOL_STATE_TRANSITION_TO_MC = 2,
3596    #[doc = "VTOL is in multicopter state"]
3597    MAV_VTOL_STATE_MC = 3,
3598    #[doc = "VTOL is in fixed-wing state"]
3599    MAV_VTOL_STATE_FW = 4,
3600}
3601impl MavVtolState {
3602    pub const DEFAULT: Self = Self::MAV_VTOL_STATE_UNDEFINED;
3603}
3604impl Default for MavVtolState {
3605    fn default() -> Self {
3606        Self::DEFAULT
3607    }
3608}
3609bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Winch status flags used in WINCH_STATUS"] pub struct MavWinchStatusFlag : u32 { # [doc = "Winch is healthy"] const MAV_WINCH_STATUS_HEALTHY = 1 ; # [doc = "Winch line is fully retracted"] const MAV_WINCH_STATUS_FULLY_RETRACTED = 2 ; # [doc = "Winch motor is moving"] const MAV_WINCH_STATUS_MOVING = 4 ; # [doc = "Winch clutch is engaged allowing motor to move freely."] const MAV_WINCH_STATUS_CLUTCH_ENGAGED = 8 ; # [doc = "Winch is locked by locking mechanism."] const MAV_WINCH_STATUS_LOCKED = 16 ; # [doc = "Winch is gravity dropping payload."] const MAV_WINCH_STATUS_DROPPING = 32 ; # [doc = "Winch is arresting payload descent."] const MAV_WINCH_STATUS_ARRESTING = 64 ; # [doc = "Winch is using torque measurements to sense the ground."] const MAV_WINCH_STATUS_GROUND_SENSE = 128 ; # [doc = "Winch is returning to the fully retracted position."] const MAV_WINCH_STATUS_RETRACTING = 256 ; # [doc = "Winch is redelivering the payload. This is a failover state if the line tension goes above a threshold during RETRACTING."] const MAV_WINCH_STATUS_REDELIVER = 512 ; # [doc = "Winch is abandoning the line and possibly payload. Winch unspools the entire calculated line length. This is a failover state from REDELIVER if the number of attempts exceeds a threshold."] const MAV_WINCH_STATUS_ABANDON_LINE = 1024 ; # [doc = "Winch is engaging the locking mechanism."] const MAV_WINCH_STATUS_LOCKING = 2048 ; # [doc = "Winch is spooling on line."] const MAV_WINCH_STATUS_LOAD_LINE = 4096 ; # [doc = "Winch is loading a payload."] const MAV_WINCH_STATUS_LOAD_PAYLOAD = 8192 ; } }
3610impl MavWinchStatusFlag {
3611    pub const DEFAULT: Self = Self::MAV_WINCH_STATUS_HEALTHY;
3612}
3613impl Default for MavWinchStatusFlag {
3614    fn default() -> Self {
3615        Self::DEFAULT
3616    }
3617}
3618#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3620#[cfg_attr(feature = "serde", serde(tag = "type"))]
3621#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3622#[repr(u32)]
3623pub enum MavlinkDataStreamType {
3624    MAVLINK_DATA_STREAM_IMG_JPEG = 0,
3625    MAVLINK_DATA_STREAM_IMG_BMP = 1,
3626    MAVLINK_DATA_STREAM_IMG_RAW8U = 2,
3627    MAVLINK_DATA_STREAM_IMG_RAW32U = 3,
3628    MAVLINK_DATA_STREAM_IMG_PGM = 4,
3629    MAVLINK_DATA_STREAM_IMG_PNG = 5,
3630}
3631impl MavlinkDataStreamType {
3632    pub const DEFAULT: Self = Self::MAVLINK_DATA_STREAM_IMG_JPEG;
3633}
3634impl Default for MavlinkDataStreamType {
3635    fn default() -> Self {
3636        Self::DEFAULT
3637    }
3638}
3639#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3640#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3641#[cfg_attr(feature = "serde", serde(tag = "type"))]
3642#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3643#[repr(u32)]
3644#[doc = "States of the mission state machine.         Note that these states are independent of whether the mission is in a mode that can execute mission items or not (is suspended).         They may not all be relevant on all vehicles."]
3645pub enum MissionState {
3646    #[doc = "The mission status reporting is not supported."]
3647    MISSION_STATE_UNKNOWN = 0,
3648    #[doc = "No mission on the vehicle."]
3649    MISSION_STATE_NO_MISSION = 1,
3650    #[doc = "Mission has not started. This is the case after a mission has uploaded but not yet started executing."]
3651    MISSION_STATE_NOT_STARTED = 2,
3652    #[doc = "Mission is active, and will execute mission items when in auto mode."]
3653    MISSION_STATE_ACTIVE = 3,
3654    #[doc = "Mission is paused when in auto mode."]
3655    MISSION_STATE_PAUSED = 4,
3656    #[doc = "Mission has executed all mission items."]
3657    MISSION_STATE_COMPLETE = 5,
3658}
3659impl MissionState {
3660    pub const DEFAULT: Self = Self::MISSION_STATE_UNKNOWN;
3661}
3662impl Default for MissionState {
3663    fn default() -> Self {
3664        Self::DEFAULT
3665    }
3666}
3667#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3668#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3669#[cfg_attr(feature = "serde", serde(tag = "type"))]
3670#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3671#[repr(u32)]
3672#[doc = "Sequence that motors are tested when using MAV_CMD_DO_MOTOR_TEST."]
3673pub enum MotorTestOrder {
3674    #[doc = "Default autopilot motor test method."]
3675    MOTOR_TEST_ORDER_DEFAULT = 0,
3676    #[doc = "Motor numbers are specified as their index in a predefined vehicle-specific sequence."]
3677    MOTOR_TEST_ORDER_SEQUENCE = 1,
3678    #[doc = "Motor numbers are specified as the output as labeled on the board."]
3679    MOTOR_TEST_ORDER_BOARD = 2,
3680}
3681impl MotorTestOrder {
3682    pub const DEFAULT: Self = Self::MOTOR_TEST_ORDER_DEFAULT;
3683}
3684impl Default for MotorTestOrder {
3685    fn default() -> Self {
3686        Self::DEFAULT
3687    }
3688}
3689#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3690#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3691#[cfg_attr(feature = "serde", serde(tag = "type"))]
3692#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3693#[repr(u32)]
3694#[doc = "Defines how throttle value is represented in MAV_CMD_DO_MOTOR_TEST."]
3695pub enum MotorTestThrottleType {
3696    #[doc = "Throttle as a percentage (0 ~ 100)"]
3697    MOTOR_TEST_THROTTLE_PERCENT = 0,
3698    #[doc = "Throttle as an absolute PWM value (normally in range of 1000~2000)."]
3699    MOTOR_TEST_THROTTLE_PWM = 1,
3700    #[doc = "Throttle pass-through from pilot's transmitter."]
3701    MOTOR_TEST_THROTTLE_PILOT = 2,
3702    #[doc = "Per-motor compass calibration test."]
3703    MOTOR_TEST_COMPASS_CAL = 3,
3704}
3705impl MotorTestThrottleType {
3706    pub const DEFAULT: Self = Self::MOTOR_TEST_THROTTLE_PERCENT;
3707}
3708impl Default for MotorTestThrottleType {
3709    fn default() -> Self {
3710        Self::DEFAULT
3711    }
3712}
3713#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3715#[cfg_attr(feature = "serde", serde(tag = "type"))]
3716#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3717#[repr(u32)]
3718pub enum NavVtolLandOptions {
3719    #[doc = "Default autopilot landing behaviour."]
3720    NAV_VTOL_LAND_OPTIONS_DEFAULT = 0,
3721    #[doc = "Descend in fixed wing mode, transitioning to multicopter mode for vertical landing when close to the ground.           The fixed wing descent pattern is at the discretion of the vehicle (e.g. transition altitude, loiter direction, radius, and speed, etc.)."]
3722    NAV_VTOL_LAND_OPTIONS_FW_DESCENT = 1,
3723    #[doc = "Land in multicopter mode on reaching the landing coordinates (the whole landing is by \"hover descent\")."]
3724    NAV_VTOL_LAND_OPTIONS_HOVER_DESCENT = 2,
3725}
3726impl NavVtolLandOptions {
3727    pub const DEFAULT: Self = Self::NAV_VTOL_LAND_OPTIONS_DEFAULT;
3728}
3729impl Default for NavVtolLandOptions {
3730    fn default() -> Self {
3731        Self::DEFAULT
3732    }
3733}
3734#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3735#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3736#[cfg_attr(feature = "serde", serde(tag = "type"))]
3737#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3738#[repr(u32)]
3739#[doc = "Yaw behaviour during orbit flight."]
3740pub enum OrbitYawBehaviour {
3741    #[doc = "Vehicle front points to the center (default)."]
3742    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER = 0,
3743    #[doc = "Vehicle front holds heading when message received."]
3744    ORBIT_YAW_BEHAVIOUR_HOLD_INITIAL_HEADING = 1,
3745    #[doc = "Yaw uncontrolled."]
3746    ORBIT_YAW_BEHAVIOUR_UNCONTROLLED = 2,
3747    #[doc = "Vehicle front follows flight path (tangential to circle)."]
3748    ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TANGENT_TO_CIRCLE = 3,
3749    #[doc = "Yaw controlled by RC input."]
3750    ORBIT_YAW_BEHAVIOUR_RC_CONTROLLED = 4,
3751    #[doc = "Vehicle uses current yaw behaviour (unchanged). The vehicle-default yaw behaviour is used if this value is specified when orbit is first commanded."]
3752    ORBIT_YAW_BEHAVIOUR_UNCHANGED = 5,
3753}
3754impl OrbitYawBehaviour {
3755    pub const DEFAULT: Self = Self::ORBIT_YAW_BEHAVIOUR_HOLD_FRONT_TO_CIRCLE_CENTER;
3756}
3757impl Default for OrbitYawBehaviour {
3758    fn default() -> Self {
3759        Self::DEFAULT
3760    }
3761}
3762#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3764#[cfg_attr(feature = "serde", serde(tag = "type"))]
3765#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3766#[repr(u32)]
3767#[doc = "Parachute actions. Trigger release and enable/disable auto-release."]
3768pub enum ParachuteAction {
3769    #[doc = "Disable auto-release of parachute (i.e. release triggered by crash detectors)."]
3770    PARACHUTE_DISABLE = 0,
3771    #[doc = "Enable auto-release of parachute."]
3772    PARACHUTE_ENABLE = 1,
3773    #[doc = "Release parachute and kill motors."]
3774    PARACHUTE_RELEASE = 2,
3775}
3776impl ParachuteAction {
3777    pub const DEFAULT: Self = Self::PARACHUTE_DISABLE;
3778}
3779impl Default for ParachuteAction {
3780    fn default() -> Self {
3781        Self::DEFAULT
3782    }
3783}
3784#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3786#[cfg_attr(feature = "serde", serde(tag = "type"))]
3787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3788#[repr(u32)]
3789#[doc = "Result from PARAM_EXT_SET message."]
3790pub enum ParamAck {
3791    #[doc = "Parameter value ACCEPTED and SET"]
3792    PARAM_ACK_ACCEPTED = 0,
3793    #[doc = "Parameter value UNKNOWN/UNSUPPORTED"]
3794    PARAM_ACK_VALUE_UNSUPPORTED = 1,
3795    #[doc = "Parameter failed to set"]
3796    PARAM_ACK_FAILED = 2,
3797    #[doc = "Parameter value received but not yet set/accepted. A subsequent PARAM_EXT_ACK with the final result will follow once operation is completed. This is returned immediately for parameters that take longer to set, indicating that the the parameter was received and does not need to be resent."]
3798    PARAM_ACK_IN_PROGRESS = 3,
3799}
3800impl ParamAck {
3801    pub const DEFAULT: Self = Self::PARAM_ACK_ACCEPTED;
3802}
3803impl Default for ParamAck {
3804    fn default() -> Self {
3805        Self::DEFAULT
3806    }
3807}
3808bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Bitmap to indicate which dimensions should be ignored by the vehicle: a value of 0b0000000000000000 or 0b0000001000000000 indicates that none of the setpoint dimensions should be ignored. If bit 9 is set the floats afx afy afz should be interpreted as force instead of acceleration."] pub struct PositionTargetTypemask : u16 { # [doc = "Ignore position x"] const POSITION_TARGET_TYPEMASK_X_IGNORE = 1 ; # [doc = "Ignore position y"] const POSITION_TARGET_TYPEMASK_Y_IGNORE = 2 ; # [doc = "Ignore position z"] const POSITION_TARGET_TYPEMASK_Z_IGNORE = 4 ; # [doc = "Ignore velocity x"] const POSITION_TARGET_TYPEMASK_VX_IGNORE = 8 ; # [doc = "Ignore velocity y"] const POSITION_TARGET_TYPEMASK_VY_IGNORE = 16 ; # [doc = "Ignore velocity z"] const POSITION_TARGET_TYPEMASK_VZ_IGNORE = 32 ; # [doc = "Ignore acceleration x"] const POSITION_TARGET_TYPEMASK_AX_IGNORE = 64 ; # [doc = "Ignore acceleration y"] const POSITION_TARGET_TYPEMASK_AY_IGNORE = 128 ; # [doc = "Ignore acceleration z"] const POSITION_TARGET_TYPEMASK_AZ_IGNORE = 256 ; # [doc = "Use force instead of acceleration"] const POSITION_TARGET_TYPEMASK_FORCE_SET = 512 ; # [doc = "Ignore yaw"] const POSITION_TARGET_TYPEMASK_YAW_IGNORE = 1024 ; # [doc = "Ignore yaw rate"] const POSITION_TARGET_TYPEMASK_YAW_RATE_IGNORE = 2048 ; } }
3809impl PositionTargetTypemask {
3810    pub const DEFAULT: Self = Self::POSITION_TARGET_TYPEMASK_X_IGNORE;
3811}
3812impl Default for PositionTargetTypemask {
3813    fn default() -> Self {
3814        Self::DEFAULT
3815    }
3816}
3817#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3819#[cfg_attr(feature = "serde", serde(tag = "type"))]
3820#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3821#[repr(u32)]
3822#[doc = "Precision land modes (used in MAV_CMD_NAV_LAND)."]
3823pub enum PrecisionLandMode {
3824    #[doc = "Normal (non-precision) landing."]
3825    PRECISION_LAND_MODE_DISABLED = 0,
3826    #[doc = "Use precision landing if beacon detected when land command accepted, otherwise land normally."]
3827    PRECISION_LAND_MODE_OPPORTUNISTIC = 1,
3828    #[doc = "Use precision landing, searching for beacon if not found when land command accepted (land normally if beacon cannot be found)."]
3829    PRECISION_LAND_MODE_REQUIRED = 2,
3830}
3831impl PrecisionLandMode {
3832    pub const DEFAULT: Self = Self::PRECISION_LAND_MODE_DISABLED;
3833}
3834impl Default for PrecisionLandMode {
3835    fn default() -> Self {
3836        Self::DEFAULT
3837    }
3838}
3839#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3840#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3841#[cfg_attr(feature = "serde", serde(tag = "type"))]
3842#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3843#[repr(u32)]
3844#[doc = "Actions for reading and writing plan information (mission, rally points, geofence) between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly missions are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3845pub enum PreflightStorageMissionAction {
3846    #[doc = "Read current mission data from persistent storage"]
3847    MISSION_READ_PERSISTENT = 0,
3848    #[doc = "Write current mission data to persistent storage"]
3849    MISSION_WRITE_PERSISTENT = 1,
3850    #[doc = "Erase all mission data stored on the vehicle (both persistent and volatile storage)"]
3851    MISSION_RESET_DEFAULT = 2,
3852}
3853impl PreflightStorageMissionAction {
3854    pub const DEFAULT: Self = Self::MISSION_READ_PERSISTENT;
3855}
3856impl Default for PreflightStorageMissionAction {
3857    fn default() -> Self {
3858        Self::DEFAULT
3859    }
3860}
3861#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3862#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3863#[cfg_attr(feature = "serde", serde(tag = "type"))]
3864#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3865#[repr(u32)]
3866#[doc = "Actions for reading/writing parameters between persistent and volatile storage when using MAV_CMD_PREFLIGHT_STORAGE.         (Commonly parameters are loaded from persistent storage (flash/EEPROM) into volatile storage (RAM) on startup and written back when they are changed.)"]
3867pub enum PreflightStorageParameterAction {
3868    #[doc = "Read all parameters from persistent storage. Replaces values in volatile storage."]
3869    PARAM_READ_PERSISTENT = 0,
3870    #[doc = "Write all parameter values to persistent storage (flash/EEPROM)"]
3871    PARAM_WRITE_PERSISTENT = 1,
3872    #[doc = "Reset all user configurable parameters to their default value (including airframe selection, sensor calibration data, safety settings, and so on). Does not reset values that contain operation counters and vehicle computed statistics."]
3873    PARAM_RESET_CONFIG_DEFAULT = 2,
3874    #[doc = "Reset only sensor calibration parameters to factory defaults (or firmware default if not available)"]
3875    PARAM_RESET_SENSOR_DEFAULT = 3,
3876    #[doc = "Reset all parameters, including operation counters, to default values"]
3877    PARAM_RESET_ALL_DEFAULT = 4,
3878}
3879impl PreflightStorageParameterAction {
3880    pub const DEFAULT: Self = Self::PARAM_READ_PERSISTENT;
3881}
3882impl Default for PreflightStorageParameterAction {
3883    fn default() -> Self {
3884        Self::DEFAULT
3885    }
3886}
3887#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3888#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3889#[cfg_attr(feature = "serde", serde(tag = "type"))]
3890#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3891#[repr(u32)]
3892#[doc = "RC sub-type of types defined in RC_TYPE. Used in MAV_CMD_START_RX_PAIR. Ignored if value does not correspond to the set RC_TYPE."]
3893pub enum RcSubType {
3894    #[doc = "Spektrum DSM2"]
3895    RC_SUB_TYPE_SPEKTRUM_DSM2 = 0,
3896    #[doc = "Spektrum DSMX"]
3897    RC_SUB_TYPE_SPEKTRUM_DSMX = 1,
3898    #[doc = "Spektrum DSMX8"]
3899    RC_SUB_TYPE_SPEKTRUM_DSMX8 = 2,
3900}
3901impl RcSubType {
3902    pub const DEFAULT: Self = Self::RC_SUB_TYPE_SPEKTRUM_DSM2;
3903}
3904impl Default for RcSubType {
3905    fn default() -> Self {
3906        Self::DEFAULT
3907    }
3908}
3909#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3910#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3911#[cfg_attr(feature = "serde", serde(tag = "type"))]
3912#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3913#[repr(u32)]
3914#[doc = "RC type. Used in MAV_CMD_START_RX_PAIR."]
3915pub enum RcType {
3916    #[doc = "Spektrum"]
3917    RC_TYPE_SPEKTRUM = 0,
3918    #[doc = "CRSF"]
3919    RC_TYPE_CRSF = 1,
3920}
3921impl RcType {
3922    pub const DEFAULT: Self = Self::RC_TYPE_SPEKTRUM;
3923}
3924impl Default for RcType {
3925    fn default() -> Self {
3926        Self::DEFAULT
3927    }
3928}
3929#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3930#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3931#[cfg_attr(feature = "serde", serde(tag = "type"))]
3932#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3933#[repr(u32)]
3934#[doc = "Specifies the conditions under which the MAV_CMD_PREFLIGHT_REBOOT_SHUTDOWN command should be accepted."]
3935pub enum RebootShutdownConditions {
3936    #[doc = "Reboot/Shutdown only if allowed by safety checks, such as being landed."]
3937    REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED = 0,
3938    #[doc = "Force reboot/shutdown of the autopilot/component regardless of system state."]
3939    REBOOT_SHUTDOWN_CONDITIONS_FORCE = 20190226,
3940}
3941impl RebootShutdownConditions {
3942    pub const DEFAULT: Self = Self::REBOOT_SHUTDOWN_CONDITIONS_SAFETY_INTERLOCKED;
3943}
3944impl Default for RebootShutdownConditions {
3945    fn default() -> Self {
3946        Self::DEFAULT
3947    }
3948}
3949#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3950#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3951#[cfg_attr(feature = "serde", serde(tag = "type"))]
3952#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3953#[repr(u32)]
3954#[doc = "RTK GPS baseline coordinate system, used for RTK corrections"]
3955pub enum RtkBaselineCoordinateSystem {
3956    #[doc = "Earth-centered, Earth-fixed"]
3957    RTK_BASELINE_COORDINATE_SYSTEM_ECEF = 0,
3958    #[doc = "RTK basestation centered, north, east, down"]
3959    RTK_BASELINE_COORDINATE_SYSTEM_NED = 1,
3960}
3961impl RtkBaselineCoordinateSystem {
3962    pub const DEFAULT: Self = Self::RTK_BASELINE_COORDINATE_SYSTEM_ECEF;
3963}
3964impl Default for RtkBaselineCoordinateSystem {
3965    fn default() -> Self {
3966        Self::DEFAULT
3967    }
3968}
3969#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3970#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3971#[cfg_attr(feature = "serde", serde(tag = "type"))]
3972#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3973#[repr(u32)]
3974#[doc = "Possible safety switch states."]
3975pub enum SafetySwitchState {
3976    #[doc = "Safety switch is engaged and vehicle should be safe to approach."]
3977    SAFETY_SWITCH_STATE_SAFE = 0,
3978    #[doc = "Safety switch is NOT engaged and motors, propellers and other actuators should be considered active."]
3979    SAFETY_SWITCH_STATE_DANGEROUS = 1,
3980}
3981impl SafetySwitchState {
3982    pub const DEFAULT: Self = Self::SAFETY_SWITCH_STATE_SAFE;
3983}
3984impl Default for SafetySwitchState {
3985    fn default() -> Self {
3986        Self::DEFAULT
3987    }
3988}
3989#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
3990#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
3991#[cfg_attr(feature = "serde", serde(tag = "type"))]
3992#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
3993#[repr(u32)]
3994#[doc = "SERIAL_CONTROL device types"]
3995pub enum SerialControlDev {
3996    #[doc = "First telemetry port"]
3997    SERIAL_CONTROL_DEV_TELEM1 = 0,
3998    #[doc = "Second telemetry port"]
3999    SERIAL_CONTROL_DEV_TELEM2 = 1,
4000    #[doc = "First GPS port"]
4001    SERIAL_CONTROL_DEV_GPS1 = 2,
4002    #[doc = "Second GPS port"]
4003    SERIAL_CONTROL_DEV_GPS2 = 3,
4004    #[doc = "system shell"]
4005    SERIAL_CONTROL_DEV_SHELL = 10,
4006    #[doc = "SERIAL0"]
4007    SERIAL_CONTROL_SERIAL0 = 100,
4008    #[doc = "SERIAL1"]
4009    SERIAL_CONTROL_SERIAL1 = 101,
4010    #[doc = "SERIAL2"]
4011    SERIAL_CONTROL_SERIAL2 = 102,
4012    #[doc = "SERIAL3"]
4013    SERIAL_CONTROL_SERIAL3 = 103,
4014    #[doc = "SERIAL4"]
4015    SERIAL_CONTROL_SERIAL4 = 104,
4016    #[doc = "SERIAL5"]
4017    SERIAL_CONTROL_SERIAL5 = 105,
4018    #[doc = "SERIAL6"]
4019    SERIAL_CONTROL_SERIAL6 = 106,
4020    #[doc = "SERIAL7"]
4021    SERIAL_CONTROL_SERIAL7 = 107,
4022    #[doc = "SERIAL8"]
4023    SERIAL_CONTROL_SERIAL8 = 108,
4024    #[doc = "SERIAL9"]
4025    SERIAL_CONTROL_SERIAL9 = 109,
4026}
4027impl SerialControlDev {
4028    pub const DEFAULT: Self = Self::SERIAL_CONTROL_DEV_TELEM1;
4029}
4030impl Default for SerialControlDev {
4031    fn default() -> Self {
4032        Self::DEFAULT
4033    }
4034}
4035bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "SERIAL_CONTROL flags (bitmask)"] pub struct SerialControlFlag : u8 { # [doc = "Set if this is a reply"] const SERIAL_CONTROL_FLAG_REPLY = 1 ; # [doc = "Set if the sender wants the receiver to send a response as another SERIAL_CONTROL message"] const SERIAL_CONTROL_FLAG_RESPOND = 2 ; # [doc = "Set if access to the serial port should be removed from whatever driver is currently using it, giving exclusive access to the SERIAL_CONTROL protocol. The port can be handed back by sending a request without this flag set"] const SERIAL_CONTROL_FLAG_EXCLUSIVE = 4 ; # [doc = "Block on writes to the serial port"] const SERIAL_CONTROL_FLAG_BLOCKING = 8 ; # [doc = "Send multiple replies until port is drained"] const SERIAL_CONTROL_FLAG_MULTI = 16 ; } }
4036impl SerialControlFlag {
4037    pub const DEFAULT: Self = Self::SERIAL_CONTROL_FLAG_REPLY;
4038}
4039impl Default for SerialControlFlag {
4040    fn default() -> Self {
4041        Self::DEFAULT
4042    }
4043}
4044#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4045#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4046#[cfg_attr(feature = "serde", serde(tag = "type"))]
4047#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4048#[repr(u32)]
4049#[doc = "Focus types for MAV_CMD_SET_CAMERA_FOCUS"]
4050pub enum SetFocusType {
4051    #[doc = "Focus one step increment (-1 for focusing in, 1 for focusing out towards infinity)."]
4052    FOCUS_TYPE_STEP = 0,
4053    #[doc = "Continuous normalized focus in/out rate until stopped. Range -1..1, negative: in, positive: out towards infinity, 0 to stop focusing. Other values should be clipped to the range."]
4054    FOCUS_TYPE_CONTINUOUS = 1,
4055    #[doc = "Focus value as proportion of full camera focus range (a value between 0.0 and 100.0)"]
4056    FOCUS_TYPE_RANGE = 2,
4057    #[doc = "Focus value in metres. Note that there is no message to get the valid focus range of the camera, so this can type can only be used for cameras where the range is known (implying that this cannot reliably be used in a GCS for an arbitrary camera)."]
4058    FOCUS_TYPE_METERS = 3,
4059    #[doc = "Focus automatically."]
4060    FOCUS_TYPE_AUTO = 4,
4061    #[doc = "Single auto focus. Mainly used for still pictures. Usually abbreviated as AF-S."]
4062    FOCUS_TYPE_AUTO_SINGLE = 5,
4063    #[doc = "Continuous auto focus. Mainly used for dynamic scenes. Abbreviated as AF-C."]
4064    FOCUS_TYPE_AUTO_CONTINUOUS = 6,
4065}
4066impl SetFocusType {
4067    pub const DEFAULT: Self = Self::FOCUS_TYPE_STEP;
4068}
4069impl Default for SetFocusType {
4070    fn default() -> Self {
4071        Self::DEFAULT
4072    }
4073}
4074#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4075#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4076#[cfg_attr(feature = "serde", serde(tag = "type"))]
4077#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4078#[repr(u32)]
4079#[doc = "Speed setpoint types used in MAV_CMD_DO_CHANGE_SPEED"]
4080pub enum SpeedType {
4081    #[doc = "Airspeed"]
4082    SPEED_TYPE_AIRSPEED = 0,
4083    #[doc = "Groundspeed"]
4084    SPEED_TYPE_GROUNDSPEED = 1,
4085    #[doc = "Climb speed"]
4086    SPEED_TYPE_CLIMB_SPEED = 2,
4087    #[doc = "Descent speed"]
4088    SPEED_TYPE_DESCENT_SPEED = 3,
4089}
4090impl SpeedType {
4091    pub const DEFAULT: Self = Self::SPEED_TYPE_AIRSPEED;
4092}
4093impl Default for SpeedType {
4094    fn default() -> Self {
4095        Self::DEFAULT
4096    }
4097}
4098#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4099#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4100#[cfg_attr(feature = "serde", serde(tag = "type"))]
4101#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4102#[repr(u32)]
4103#[doc = "Flags to indicate the status of camera storage."]
4104pub enum StorageStatus {
4105    #[doc = "Storage is missing (no microSD card loaded for example.)"]
4106    STORAGE_STATUS_EMPTY = 0,
4107    #[doc = "Storage present but unformatted."]
4108    STORAGE_STATUS_UNFORMATTED = 1,
4109    #[doc = "Storage present and ready."]
4110    STORAGE_STATUS_READY = 2,
4111    #[doc = "Camera does not supply storage status information. Capacity information in STORAGE_INFORMATION fields will be ignored."]
4112    STORAGE_STATUS_NOT_SUPPORTED = 3,
4113}
4114impl StorageStatus {
4115    pub const DEFAULT: Self = Self::STORAGE_STATUS_EMPTY;
4116}
4117impl Default for StorageStatus {
4118    fn default() -> Self {
4119        Self::DEFAULT
4120    }
4121}
4122#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4123#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4124#[cfg_attr(feature = "serde", serde(tag = "type"))]
4125#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4126#[repr(u32)]
4127#[doc = "Flags to indicate the type of storage."]
4128pub enum StorageType {
4129    #[doc = "Storage type is not known."]
4130    STORAGE_TYPE_UNKNOWN = 0,
4131    #[doc = "Storage type is USB device."]
4132    STORAGE_TYPE_USB_STICK = 1,
4133    #[doc = "Storage type is SD card."]
4134    STORAGE_TYPE_SD = 2,
4135    #[doc = "Storage type is microSD card."]
4136    STORAGE_TYPE_MICROSD = 3,
4137    #[doc = "Storage type is CFast."]
4138    STORAGE_TYPE_CF = 4,
4139    #[doc = "Storage type is CFexpress."]
4140    STORAGE_TYPE_CFE = 5,
4141    #[doc = "Storage type is XQD."]
4142    STORAGE_TYPE_XQD = 6,
4143    #[doc = "Storage type is HD mass storage type."]
4144    STORAGE_TYPE_HD = 7,
4145    #[doc = "Storage type is other, not listed type."]
4146    STORAGE_TYPE_OTHER = 254,
4147}
4148impl StorageType {
4149    pub const DEFAULT: Self = Self::STORAGE_TYPE_UNKNOWN;
4150}
4151impl Default for StorageType {
4152    fn default() -> Self {
4153        Self::DEFAULT
4154    }
4155}
4156bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags to indicate usage for a particular storage (see STORAGE_INFORMATION.storage_usage and MAV_CMD_SET_STORAGE_USAGE)."] pub struct StorageUsageFlag : u8 { # [doc = "Always set to 1 (indicates STORAGE_INFORMATION.storage_usage is supported)."] const STORAGE_USAGE_FLAG_SET = 1 ; # [doc = "Storage for saving photos."] const STORAGE_USAGE_FLAG_PHOTO = 2 ; # [doc = "Storage for saving videos."] const STORAGE_USAGE_FLAG_VIDEO = 4 ; # [doc = "Storage for saving logs."] const STORAGE_USAGE_FLAG_LOGS = 8 ; } }
4157impl StorageUsageFlag {
4158    pub const DEFAULT: Self = Self::STORAGE_USAGE_FLAG_SET;
4159}
4160impl Default for StorageUsageFlag {
4161    fn default() -> Self {
4162        Self::DEFAULT
4163    }
4164}
4165#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4166#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4167#[cfg_attr(feature = "serde", serde(tag = "type"))]
4168#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4169#[repr(u32)]
4170#[doc = "Tune formats (used for vehicle buzzer/tone generation)."]
4171pub enum TuneFormat {
4172    #[doc = "Format is QBasic 1.1 Play: <https://www.qbasic.net/en/reference/qb11/Statement/PLAY-006.htm>."]
4173    TUNE_FORMAT_QBASIC1_1 = 1,
4174    #[doc = "Format is Modern Music Markup Language (MML): <https://en.wikipedia.org/wiki/Music_Macro_Language#Modern_MML>."]
4175    TUNE_FORMAT_MML_MODERN = 2,
4176}
4177impl TuneFormat {
4178    pub const DEFAULT: Self = Self::TUNE_FORMAT_QBASIC1_1;
4179}
4180impl Default for TuneFormat {
4181    fn default() -> Self {
4182        Self::DEFAULT
4183    }
4184}
4185#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4186#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4187#[cfg_attr(feature = "serde", serde(tag = "type"))]
4188#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4189#[repr(u32)]
4190#[doc = "Available autopilot modes for ualberta uav"]
4191pub enum UalbertaAutopilotMode {
4192    #[doc = "Raw input pulse widts sent to output"]
4193    MODE_MANUAL_DIRECT = 1,
4194    #[doc = "Inputs are normalized using calibration, the converted back to raw pulse widths for output"]
4195    MODE_MANUAL_SCALED = 2,
4196    MODE_AUTO_PID_ATT = 3,
4197    MODE_AUTO_PID_VEL = 4,
4198    MODE_AUTO_PID_POS = 5,
4199}
4200impl UalbertaAutopilotMode {
4201    pub const DEFAULT: Self = Self::MODE_MANUAL_DIRECT;
4202}
4203impl Default for UalbertaAutopilotMode {
4204    fn default() -> Self {
4205        Self::DEFAULT
4206    }
4207}
4208#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4209#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4210#[cfg_attr(feature = "serde", serde(tag = "type"))]
4211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4212#[repr(u32)]
4213#[doc = "Navigation filter mode"]
4214pub enum UalbertaNavMode {
4215    NAV_AHRS_INIT = 1,
4216    #[doc = "AHRS mode"]
4217    NAV_AHRS = 2,
4218    #[doc = "INS/GPS initialization mode"]
4219    NAV_INS_GPS_INIT = 3,
4220    #[doc = "INS/GPS mode"]
4221    NAV_INS_GPS = 4,
4222}
4223impl UalbertaNavMode {
4224    pub const DEFAULT: Self = Self::NAV_AHRS_INIT;
4225}
4226impl Default for UalbertaNavMode {
4227    fn default() -> Self {
4228        Self::DEFAULT
4229    }
4230}
4231#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4233#[cfg_attr(feature = "serde", serde(tag = "type"))]
4234#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4235#[repr(u32)]
4236#[doc = "Mode currently commanded by pilot"]
4237pub enum UalbertaPilotMode {
4238    PILOT_MANUAL = 1,
4239    PILOT_AUTO = 2,
4240    #[doc = "Rotomotion mode"]
4241    PILOT_ROTO = 3,
4242}
4243impl UalbertaPilotMode {
4244    pub const DEFAULT: Self = Self::PILOT_MANUAL;
4245}
4246impl Default for UalbertaPilotMode {
4247    fn default() -> Self {
4248        Self::DEFAULT
4249    }
4250}
4251#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4252#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4253#[cfg_attr(feature = "serde", serde(tag = "type"))]
4254#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4255#[repr(u32)]
4256#[doc = "Generalized UAVCAN node health"]
4257pub enum UavcanNodeHealth {
4258    #[doc = "The node is functioning properly."]
4259    UAVCAN_NODE_HEALTH_OK = 0,
4260    #[doc = "A critical parameter went out of range or the node has encountered a minor failure."]
4261    UAVCAN_NODE_HEALTH_WARNING = 1,
4262    #[doc = "The node has encountered a major failure."]
4263    UAVCAN_NODE_HEALTH_ERROR = 2,
4264    #[doc = "The node has suffered a fatal malfunction."]
4265    UAVCAN_NODE_HEALTH_CRITICAL = 3,
4266}
4267impl UavcanNodeHealth {
4268    pub const DEFAULT: Self = Self::UAVCAN_NODE_HEALTH_OK;
4269}
4270impl Default for UavcanNodeHealth {
4271    fn default() -> Self {
4272        Self::DEFAULT
4273    }
4274}
4275#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4276#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4277#[cfg_attr(feature = "serde", serde(tag = "type"))]
4278#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4279#[repr(u32)]
4280#[doc = "Generalized UAVCAN node mode"]
4281pub enum UavcanNodeMode {
4282    #[doc = "The node is performing its primary functions."]
4283    UAVCAN_NODE_MODE_OPERATIONAL = 0,
4284    #[doc = "The node is initializing; this mode is entered immediately after startup."]
4285    UAVCAN_NODE_MODE_INITIALIZATION = 1,
4286    #[doc = "The node is under maintenance."]
4287    UAVCAN_NODE_MODE_MAINTENANCE = 2,
4288    #[doc = "The node is in the process of updating its software."]
4289    UAVCAN_NODE_MODE_SOFTWARE_UPDATE = 3,
4290    #[doc = "The node is no longer available online."]
4291    UAVCAN_NODE_MODE_OFFLINE = 7,
4292}
4293impl UavcanNodeMode {
4294    pub const DEFAULT: Self = Self::UAVCAN_NODE_MODE_OPERATIONAL;
4295}
4296impl Default for UavcanNodeMode {
4297    fn default() -> Self {
4298        Self::DEFAULT
4299    }
4300}
4301bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Flags for the global position report."] pub struct UtmDataAvailFlags : u8 { # [doc = "The field time contains valid data."] const UTM_DATA_AVAIL_FLAGS_TIME_VALID = 1 ; # [doc = "The field uas_id contains valid data."] const UTM_DATA_AVAIL_FLAGS_UAS_ID_AVAILABLE = 2 ; # [doc = "The fields lat, lon and h_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_POSITION_AVAILABLE = 4 ; # [doc = "The fields alt and v_acc contain valid data."] const UTM_DATA_AVAIL_FLAGS_ALTITUDE_AVAILABLE = 8 ; # [doc = "The field relative_alt contains valid data."] const UTM_DATA_AVAIL_FLAGS_RELATIVE_ALTITUDE_AVAILABLE = 16 ; # [doc = "The fields vx and vy contain valid data."] const UTM_DATA_AVAIL_FLAGS_HORIZONTAL_VELO_AVAILABLE = 32 ; # [doc = "The field vz contains valid data."] const UTM_DATA_AVAIL_FLAGS_VERTICAL_VELO_AVAILABLE = 64 ; # [doc = "The fields next_lat, next_lon and next_alt contain valid data."] const UTM_DATA_AVAIL_FLAGS_NEXT_WAYPOINT_AVAILABLE = 128 ; } }
4302impl UtmDataAvailFlags {
4303    pub const DEFAULT: Self = Self::UTM_DATA_AVAIL_FLAGS_TIME_VALID;
4304}
4305impl Default for UtmDataAvailFlags {
4306    fn default() -> Self {
4307        Self::DEFAULT
4308    }
4309}
4310#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4311#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4312#[cfg_attr(feature = "serde", serde(tag = "type"))]
4313#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4314#[repr(u32)]
4315#[doc = "Airborne status of UAS."]
4316pub enum UtmFlightState {
4317    #[doc = "The flight state can't be determined."]
4318    UTM_FLIGHT_STATE_UNKNOWN = 1,
4319    #[doc = "UAS on ground."]
4320    UTM_FLIGHT_STATE_GROUND = 2,
4321    #[doc = "UAS airborne."]
4322    UTM_FLIGHT_STATE_AIRBORNE = 3,
4323    #[doc = "UAS is in an emergency flight state."]
4324    UTM_FLIGHT_STATE_EMERGENCY = 16,
4325    #[doc = "UAS has no active controls."]
4326    UTM_FLIGHT_STATE_NOCTRL = 32,
4327}
4328impl UtmFlightState {
4329    pub const DEFAULT: Self = Self::UTM_FLIGHT_STATE_UNKNOWN;
4330}
4331impl Default for UtmFlightState {
4332    fn default() -> Self {
4333        Self::DEFAULT
4334    }
4335}
4336#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4337#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4338#[cfg_attr(feature = "serde", serde(tag = "type"))]
4339#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4340#[repr(u32)]
4341#[doc = "Video stream encodings"]
4342pub enum VideoStreamEncoding {
4343    #[doc = "Stream encoding is unknown"]
4344    VIDEO_STREAM_ENCODING_UNKNOWN = 0,
4345    #[doc = "Stream encoding is H.264"]
4346    VIDEO_STREAM_ENCODING_H264 = 1,
4347    #[doc = "Stream encoding is H.265"]
4348    VIDEO_STREAM_ENCODING_H265 = 2,
4349}
4350impl VideoStreamEncoding {
4351    pub const DEFAULT: Self = Self::VIDEO_STREAM_ENCODING_UNKNOWN;
4352}
4353impl Default for VideoStreamEncoding {
4354    fn default() -> Self {
4355        Self::DEFAULT
4356    }
4357}
4358bitflags! { # [cfg_attr (feature = "serde" , derive (Serialize , Deserialize))] # [cfg_attr (feature = "arbitrary" , derive (Arbitrary))] # [derive (Debug , Copy , Clone , PartialEq)] # [doc = "Stream status flags (Bitmap)"] pub struct VideoStreamStatusFlags : u16 { # [doc = "Stream is active (running)"] const VIDEO_STREAM_STATUS_FLAGS_RUNNING = 1 ; # [doc = "Stream is thermal imaging"] const VIDEO_STREAM_STATUS_FLAGS_THERMAL = 2 ; # [doc = "Stream can report absolute thermal range (see CAMERA_THERMAL_RANGE)."] const VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED = 4 ; } }
4359impl VideoStreamStatusFlags {
4360    pub const DEFAULT: Self = Self::VIDEO_STREAM_STATUS_FLAGS_RUNNING;
4361}
4362impl Default for VideoStreamStatusFlags {
4363    fn default() -> Self {
4364        Self::DEFAULT
4365    }
4366}
4367#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4368#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4369#[cfg_attr(feature = "serde", serde(tag = "type"))]
4370#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4371#[repr(u32)]
4372#[doc = "Video stream types"]
4373pub enum VideoStreamType {
4374    #[doc = "Stream is RTSP"]
4375    VIDEO_STREAM_TYPE_RTSP = 0,
4376    #[doc = "Stream is RTP UDP (URI gives the port number)"]
4377    VIDEO_STREAM_TYPE_RTPUDP = 1,
4378    #[doc = "Stream is MPEG on TCP"]
4379    VIDEO_STREAM_TYPE_TCP_MPEG = 2,
4380    #[doc = "Stream is MPEG TS (URI gives the port number)"]
4381    VIDEO_STREAM_TYPE_MPEG_TS = 3,
4382}
4383impl VideoStreamType {
4384    pub const DEFAULT: Self = Self::VIDEO_STREAM_TYPE_RTSP;
4385}
4386impl Default for VideoStreamType {
4387    fn default() -> Self {
4388        Self::DEFAULT
4389    }
4390}
4391#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4392#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4393#[cfg_attr(feature = "serde", serde(tag = "type"))]
4394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4395#[repr(u32)]
4396#[doc = "Direction of VTOL transition"]
4397pub enum VtolTransitionHeading {
4398    #[doc = "Respect the heading configuration of the vehicle."]
4399    VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT = 0,
4400    #[doc = "Use the heading pointing towards the next waypoint."]
4401    VTOL_TRANSITION_HEADING_NEXT_WAYPOINT = 1,
4402    #[doc = "Use the heading on takeoff (while sitting on the ground)."]
4403    VTOL_TRANSITION_HEADING_TAKEOFF = 2,
4404    #[doc = "Use the specified heading in parameter 4."]
4405    VTOL_TRANSITION_HEADING_SPECIFIED = 3,
4406    #[doc = "Use the current heading when reaching takeoff altitude (potentially facing the wind when weather-vaning is active)."]
4407    VTOL_TRANSITION_HEADING_ANY = 4,
4408}
4409impl VtolTransitionHeading {
4410    pub const DEFAULT: Self = Self::VTOL_TRANSITION_HEADING_VEHICLE_DEFAULT;
4411}
4412impl Default for VtolTransitionHeading {
4413    fn default() -> Self {
4414        Self::DEFAULT
4415    }
4416}
4417#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4418#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4419#[cfg_attr(feature = "serde", serde(tag = "type"))]
4420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4421#[repr(u32)]
4422#[doc = "WiFi Mode."]
4423pub enum WifiConfigApMode {
4424    #[doc = "WiFi mode is undefined."]
4425    WIFI_CONFIG_AP_MODE_UNDEFINED = 0,
4426    #[doc = "WiFi configured as an access point."]
4427    WIFI_CONFIG_AP_MODE_AP = 1,
4428    #[doc = "WiFi configured as a station connected to an existing local WiFi network."]
4429    WIFI_CONFIG_AP_MODE_STATION = 2,
4430    #[doc = "WiFi disabled."]
4431    WIFI_CONFIG_AP_MODE_DISABLED = 3,
4432}
4433impl WifiConfigApMode {
4434    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_MODE_UNDEFINED;
4435}
4436impl Default for WifiConfigApMode {
4437    fn default() -> Self {
4438        Self::DEFAULT
4439    }
4440}
4441#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4442#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4443#[cfg_attr(feature = "serde", serde(tag = "type"))]
4444#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4445#[repr(u32)]
4446#[doc = "Possible responses from a WIFI_CONFIG_AP message."]
4447pub enum WifiConfigApResponse {
4448    #[doc = "Undefined response. Likely an indicative of a system that doesn't support this request."]
4449    WIFI_CONFIG_AP_RESPONSE_UNDEFINED = 0,
4450    #[doc = "Changes accepted."]
4451    WIFI_CONFIG_AP_RESPONSE_ACCEPTED = 1,
4452    #[doc = "Changes rejected."]
4453    WIFI_CONFIG_AP_RESPONSE_REJECTED = 2,
4454    #[doc = "Invalid Mode."]
4455    WIFI_CONFIG_AP_RESPONSE_MODE_ERROR = 3,
4456    #[doc = "Invalid SSID."]
4457    WIFI_CONFIG_AP_RESPONSE_SSID_ERROR = 4,
4458    #[doc = "Invalid Password."]
4459    WIFI_CONFIG_AP_RESPONSE_PASSWORD_ERROR = 5,
4460}
4461impl WifiConfigApResponse {
4462    pub const DEFAULT: Self = Self::WIFI_CONFIG_AP_RESPONSE_UNDEFINED;
4463}
4464impl Default for WifiConfigApResponse {
4465    fn default() -> Self {
4466        Self::DEFAULT
4467    }
4468}
4469#[derive(Debug, Copy, Clone, PartialEq, FromPrimitive, ToPrimitive)]
4470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4471#[cfg_attr(feature = "serde", serde(tag = "type"))]
4472#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4473#[repr(u32)]
4474#[doc = "Winch actions."]
4475pub enum WinchActions {
4476    #[doc = "Allow motor to freewheel."]
4477    WINCH_RELAXED = 0,
4478    #[doc = "Wind or unwind specified length of line, optionally using specified rate."]
4479    WINCH_RELATIVE_LENGTH_CONTROL = 1,
4480    #[doc = "Wind or unwind line at specified rate."]
4481    WINCH_RATE_CONTROL = 2,
4482    #[doc = "Perform the locking sequence to relieve motor while in the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4483    WINCH_LOCK = 3,
4484    #[doc = "Sequence of drop, slow down, touch down, reel up, lock. Only action and instance command parameters are used, others are ignored."]
4485    WINCH_DELIVER = 4,
4486    #[doc = "Engage motor and hold current position. Only action and instance command parameters are used, others are ignored."]
4487    WINCH_HOLD = 5,
4488    #[doc = "Return the reel to the fully retracted position. Only action and instance command parameters are used, others are ignored."]
4489    WINCH_RETRACT = 6,
4490    #[doc = "Load the reel with line. The winch will calculate the total loaded length and stop when the tension exceeds a threshold. Only action and instance command parameters are used, others are ignored."]
4491    WINCH_LOAD_LINE = 7,
4492    #[doc = "Spool out the entire length of the line. Only action and instance command parameters are used, others are ignored."]
4493    WINCH_ABANDON_LINE = 8,
4494    #[doc = "Spools out just enough to present the hook to the user to load the payload. Only action and instance command parameters are used, others are ignored"]
4495    WINCH_LOAD_PAYLOAD = 9,
4496}
4497impl WinchActions {
4498    pub const DEFAULT: Self = Self::WINCH_RELAXED;
4499}
4500impl Default for WinchActions {
4501    fn default() -> Self {
4502        Self::DEFAULT
4503    }
4504}
4505#[doc = "id: 140"]
4506#[doc = "Set the vehicle attitude and body angular rates."]
4507#[derive(Debug, Clone, PartialEq)]
4508#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4509#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4510pub struct ACTUATOR_CONTROL_TARGET_DATA {
4511    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
4512    pub time_usec: u64,
4513    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
4514    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4515    pub controls: [f32; 8],
4516    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
4517    pub group_mlx: u8,
4518}
4519impl ACTUATOR_CONTROL_TARGET_DATA {
4520    pub const ENCODED_LEN: usize = 41usize;
4521    pub const DEFAULT: Self = Self {
4522        time_usec: 0_u64,
4523        controls: [0.0_f32; 8usize],
4524        group_mlx: 0_u8,
4525    };
4526    #[cfg(feature = "arbitrary")]
4527    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4528        use arbitrary::{Arbitrary, Unstructured};
4529        let mut buf = [0u8; 1024];
4530        rng.fill_bytes(&mut buf);
4531        let mut unstructured = Unstructured::new(&buf);
4532        Self::arbitrary(&mut unstructured).unwrap_or_default()
4533    }
4534}
4535impl Default for ACTUATOR_CONTROL_TARGET_DATA {
4536    fn default() -> Self {
4537        Self::DEFAULT.clone()
4538    }
4539}
4540impl MessageData for ACTUATOR_CONTROL_TARGET_DATA {
4541    type Message = MavMessage;
4542    const ID: u32 = 140u32;
4543    const NAME: &'static str = "ACTUATOR_CONTROL_TARGET";
4544    const EXTRA_CRC: u8 = 181u8;
4545    const ENCODED_LEN: usize = 41usize;
4546    fn deser(
4547        _version: MavlinkVersion,
4548        __input: &[u8],
4549    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4550        let avail_len = __input.len();
4551        let mut payload_buf = [0; Self::ENCODED_LEN];
4552        let mut buf = if avail_len < Self::ENCODED_LEN {
4553            payload_buf[0..avail_len].copy_from_slice(__input);
4554            Bytes::new(&payload_buf)
4555        } else {
4556            Bytes::new(__input)
4557        };
4558        let mut __struct = Self::default();
4559        __struct.time_usec = buf.get_u64_le();
4560        for v in &mut __struct.controls {
4561            let val = buf.get_f32_le();
4562            *v = val;
4563        }
4564        __struct.group_mlx = buf.get_u8();
4565        Ok(__struct)
4566    }
4567    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4568        let mut __tmp = BytesMut::new(bytes);
4569        #[allow(clippy::absurd_extreme_comparisons)]
4570        #[allow(unused_comparisons)]
4571        if __tmp.remaining() < Self::ENCODED_LEN {
4572            panic!(
4573                "buffer is too small (need {} bytes, but got {})",
4574                Self::ENCODED_LEN,
4575                __tmp.remaining(),
4576            )
4577        }
4578        __tmp.put_u64_le(self.time_usec);
4579        for val in &self.controls {
4580            __tmp.put_f32_le(*val);
4581        }
4582        __tmp.put_u8(self.group_mlx);
4583        if matches!(version, MavlinkVersion::V2) {
4584            let len = __tmp.len();
4585            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4586        } else {
4587            __tmp.len()
4588        }
4589    }
4590}
4591#[doc = "id: 375"]
4592#[doc = "The raw values of the actuator outputs (e.g. on Pixhawk, from MAIN, AUX ports). This message supersedes SERVO_OUTPUT_RAW."]
4593#[derive(Debug, Clone, PartialEq)]
4594#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4595#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4596pub struct ACTUATOR_OUTPUT_STATUS_DATA {
4597    #[doc = "Timestamp (since system boot)."]
4598    pub time_usec: u64,
4599    #[doc = "Active outputs"]
4600    pub active: u32,
4601    #[doc = "Servo / motor output array values. Zero values indicate unused channels."]
4602    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4603    pub actuator: [f32; 32],
4604}
4605impl ACTUATOR_OUTPUT_STATUS_DATA {
4606    pub const ENCODED_LEN: usize = 140usize;
4607    pub const DEFAULT: Self = Self {
4608        time_usec: 0_u64,
4609        active: 0_u32,
4610        actuator: [0.0_f32; 32usize],
4611    };
4612    #[cfg(feature = "arbitrary")]
4613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4614        use arbitrary::{Arbitrary, Unstructured};
4615        let mut buf = [0u8; 1024];
4616        rng.fill_bytes(&mut buf);
4617        let mut unstructured = Unstructured::new(&buf);
4618        Self::arbitrary(&mut unstructured).unwrap_or_default()
4619    }
4620}
4621impl Default for ACTUATOR_OUTPUT_STATUS_DATA {
4622    fn default() -> Self {
4623        Self::DEFAULT.clone()
4624    }
4625}
4626impl MessageData for ACTUATOR_OUTPUT_STATUS_DATA {
4627    type Message = MavMessage;
4628    const ID: u32 = 375u32;
4629    const NAME: &'static str = "ACTUATOR_OUTPUT_STATUS";
4630    const EXTRA_CRC: u8 = 251u8;
4631    const ENCODED_LEN: usize = 140usize;
4632    fn deser(
4633        _version: MavlinkVersion,
4634        __input: &[u8],
4635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4636        let avail_len = __input.len();
4637        let mut payload_buf = [0; Self::ENCODED_LEN];
4638        let mut buf = if avail_len < Self::ENCODED_LEN {
4639            payload_buf[0..avail_len].copy_from_slice(__input);
4640            Bytes::new(&payload_buf)
4641        } else {
4642            Bytes::new(__input)
4643        };
4644        let mut __struct = Self::default();
4645        __struct.time_usec = buf.get_u64_le();
4646        __struct.active = buf.get_u32_le();
4647        for v in &mut __struct.actuator {
4648            let val = buf.get_f32_le();
4649            *v = val;
4650        }
4651        Ok(__struct)
4652    }
4653    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4654        let mut __tmp = BytesMut::new(bytes);
4655        #[allow(clippy::absurd_extreme_comparisons)]
4656        #[allow(unused_comparisons)]
4657        if __tmp.remaining() < Self::ENCODED_LEN {
4658            panic!(
4659                "buffer is too small (need {} bytes, but got {})",
4660                Self::ENCODED_LEN,
4661                __tmp.remaining(),
4662            )
4663        }
4664        __tmp.put_u64_le(self.time_usec);
4665        __tmp.put_u32_le(self.active);
4666        for val in &self.actuator {
4667            __tmp.put_f32_le(*val);
4668        }
4669        if matches!(version, MavlinkVersion::V2) {
4670            let len = __tmp.len();
4671            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4672        } else {
4673            __tmp.len()
4674        }
4675    }
4676}
4677#[doc = "id: 246"]
4678#[doc = "The location and information of an ADSB vehicle."]
4679#[derive(Debug, Clone, PartialEq)]
4680#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4681#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4682pub struct ADSB_VEHICLE_DATA {
4683    #[doc = "ICAO address"]
4684    pub ICAO_address: u32,
4685    #[doc = "Latitude"]
4686    pub lat: i32,
4687    #[doc = "Longitude"]
4688    pub lon: i32,
4689    #[doc = "Altitude(ASL)"]
4690    pub altitude: i32,
4691    #[doc = "Course over ground"]
4692    pub heading: u16,
4693    #[doc = "The horizontal velocity"]
4694    pub hor_velocity: u16,
4695    #[doc = "The vertical velocity. Positive is up"]
4696    pub ver_velocity: i16,
4697    #[doc = "Bitmap to indicate various statuses including valid data fields"]
4698    pub flags: AdsbFlags,
4699    #[doc = "Squawk code. Note that the code is in decimal: e.g. 7700 (general emergency) is encoded as binary 0b0001_1110_0001_0100, not(!) as 0b0000_111_111_000_000"]
4700    pub squawk: u16,
4701    #[doc = "ADSB altitude type."]
4702    pub altitude_type: AdsbAltitudeType,
4703    #[doc = "The callsign, 8+null"]
4704    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4705    pub callsign: [u8; 9],
4706    #[doc = "ADSB emitter type."]
4707    pub emitter_type: AdsbEmitterType,
4708    #[doc = "Time since last communication in seconds"]
4709    pub tslc: u8,
4710}
4711impl ADSB_VEHICLE_DATA {
4712    pub const ENCODED_LEN: usize = 38usize;
4713    pub const DEFAULT: Self = Self {
4714        ICAO_address: 0_u32,
4715        lat: 0_i32,
4716        lon: 0_i32,
4717        altitude: 0_i32,
4718        heading: 0_u16,
4719        hor_velocity: 0_u16,
4720        ver_velocity: 0_i16,
4721        flags: AdsbFlags::DEFAULT,
4722        squawk: 0_u16,
4723        altitude_type: AdsbAltitudeType::DEFAULT,
4724        callsign: [0_u8; 9usize],
4725        emitter_type: AdsbEmitterType::DEFAULT,
4726        tslc: 0_u8,
4727    };
4728    #[cfg(feature = "arbitrary")]
4729    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4730        use arbitrary::{Arbitrary, Unstructured};
4731        let mut buf = [0u8; 1024];
4732        rng.fill_bytes(&mut buf);
4733        let mut unstructured = Unstructured::new(&buf);
4734        Self::arbitrary(&mut unstructured).unwrap_or_default()
4735    }
4736}
4737impl Default for ADSB_VEHICLE_DATA {
4738    fn default() -> Self {
4739        Self::DEFAULT.clone()
4740    }
4741}
4742impl MessageData for ADSB_VEHICLE_DATA {
4743    type Message = MavMessage;
4744    const ID: u32 = 246u32;
4745    const NAME: &'static str = "ADSB_VEHICLE";
4746    const EXTRA_CRC: u8 = 184u8;
4747    const ENCODED_LEN: usize = 38usize;
4748    fn deser(
4749        _version: MavlinkVersion,
4750        __input: &[u8],
4751    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4752        let avail_len = __input.len();
4753        let mut payload_buf = [0; Self::ENCODED_LEN];
4754        let mut buf = if avail_len < Self::ENCODED_LEN {
4755            payload_buf[0..avail_len].copy_from_slice(__input);
4756            Bytes::new(&payload_buf)
4757        } else {
4758            Bytes::new(__input)
4759        };
4760        let mut __struct = Self::default();
4761        __struct.ICAO_address = buf.get_u32_le();
4762        __struct.lat = buf.get_i32_le();
4763        __struct.lon = buf.get_i32_le();
4764        __struct.altitude = buf.get_i32_le();
4765        __struct.heading = buf.get_u16_le();
4766        __struct.hor_velocity = buf.get_u16_le();
4767        __struct.ver_velocity = buf.get_i16_le();
4768        let tmp = buf.get_u16_le();
4769        __struct.flags = AdsbFlags::from_bits(tmp & AdsbFlags::all().bits()).ok_or(
4770            ::mavlink_core::error::ParserError::InvalidFlag {
4771                flag_type: "AdsbFlags",
4772                value: tmp as u32,
4773            },
4774        )?;
4775        __struct.squawk = buf.get_u16_le();
4776        let tmp = buf.get_u8();
4777        __struct.altitude_type =
4778            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4779                enum_type: "AdsbAltitudeType",
4780                value: tmp as u32,
4781            })?;
4782        for v in &mut __struct.callsign {
4783            let val = buf.get_u8();
4784            *v = val;
4785        }
4786        let tmp = buf.get_u8();
4787        __struct.emitter_type =
4788            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4789                enum_type: "AdsbEmitterType",
4790                value: tmp as u32,
4791            })?;
4792        __struct.tslc = buf.get_u8();
4793        Ok(__struct)
4794    }
4795    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4796        let mut __tmp = BytesMut::new(bytes);
4797        #[allow(clippy::absurd_extreme_comparisons)]
4798        #[allow(unused_comparisons)]
4799        if __tmp.remaining() < Self::ENCODED_LEN {
4800            panic!(
4801                "buffer is too small (need {} bytes, but got {})",
4802                Self::ENCODED_LEN,
4803                __tmp.remaining(),
4804            )
4805        }
4806        __tmp.put_u32_le(self.ICAO_address);
4807        __tmp.put_i32_le(self.lat);
4808        __tmp.put_i32_le(self.lon);
4809        __tmp.put_i32_le(self.altitude);
4810        __tmp.put_u16_le(self.heading);
4811        __tmp.put_u16_le(self.hor_velocity);
4812        __tmp.put_i16_le(self.ver_velocity);
4813        __tmp.put_u16_le(self.flags.bits());
4814        __tmp.put_u16_le(self.squawk);
4815        __tmp.put_u8(self.altitude_type as u8);
4816        for val in &self.callsign {
4817            __tmp.put_u8(*val);
4818        }
4819        __tmp.put_u8(self.emitter_type as u8);
4820        __tmp.put_u8(self.tslc);
4821        if matches!(version, MavlinkVersion::V2) {
4822            let len = __tmp.len();
4823            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
4824        } else {
4825            __tmp.len()
4826        }
4827    }
4828}
4829#[doc = "id: 301"]
4830#[doc = "The location and information of an AIS vessel."]
4831#[derive(Debug, Clone, PartialEq)]
4832#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
4833#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
4834pub struct AIS_VESSEL_DATA {
4835    #[doc = "Mobile Marine Service Identifier, 9 decimal digits"]
4836    pub MMSI: u32,
4837    #[doc = "Latitude"]
4838    pub lat: i32,
4839    #[doc = "Longitude"]
4840    pub lon: i32,
4841    #[doc = "Course over ground"]
4842    pub COG: u16,
4843    #[doc = "True heading"]
4844    pub heading: u16,
4845    #[doc = "Speed over ground"]
4846    pub velocity: u16,
4847    #[doc = "Distance from lat/lon location to bow"]
4848    pub dimension_bow: u16,
4849    #[doc = "Distance from lat/lon location to stern"]
4850    pub dimension_stern: u16,
4851    #[doc = "Time since last communication in seconds"]
4852    pub tslc: u16,
4853    #[doc = "Bitmask to indicate various statuses including valid data fields"]
4854    pub flags: AisFlags,
4855    #[doc = "Turn rate"]
4856    pub turn_rate: i8,
4857    #[doc = "Navigational status"]
4858    pub navigational_status: AisNavStatus,
4859    #[doc = "Type of vessels"]
4860    pub mavtype: AisType,
4861    #[doc = "Distance from lat/lon location to port side"]
4862    pub dimension_port: u8,
4863    #[doc = "Distance from lat/lon location to starboard side"]
4864    pub dimension_starboard: u8,
4865    #[doc = "The vessel callsign"]
4866    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4867    pub callsign: [u8; 7],
4868    #[doc = "The vessel name"]
4869    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
4870    pub name: [u8; 20],
4871}
4872impl AIS_VESSEL_DATA {
4873    pub const ENCODED_LEN: usize = 58usize;
4874    pub const DEFAULT: Self = Self {
4875        MMSI: 0_u32,
4876        lat: 0_i32,
4877        lon: 0_i32,
4878        COG: 0_u16,
4879        heading: 0_u16,
4880        velocity: 0_u16,
4881        dimension_bow: 0_u16,
4882        dimension_stern: 0_u16,
4883        tslc: 0_u16,
4884        flags: AisFlags::DEFAULT,
4885        turn_rate: 0_i8,
4886        navigational_status: AisNavStatus::DEFAULT,
4887        mavtype: AisType::DEFAULT,
4888        dimension_port: 0_u8,
4889        dimension_starboard: 0_u8,
4890        callsign: [0_u8; 7usize],
4891        name: [0_u8; 20usize],
4892    };
4893    #[cfg(feature = "arbitrary")]
4894    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
4895        use arbitrary::{Arbitrary, Unstructured};
4896        let mut buf = [0u8; 1024];
4897        rng.fill_bytes(&mut buf);
4898        let mut unstructured = Unstructured::new(&buf);
4899        Self::arbitrary(&mut unstructured).unwrap_or_default()
4900    }
4901}
4902impl Default for AIS_VESSEL_DATA {
4903    fn default() -> Self {
4904        Self::DEFAULT.clone()
4905    }
4906}
4907impl MessageData for AIS_VESSEL_DATA {
4908    type Message = MavMessage;
4909    const ID: u32 = 301u32;
4910    const NAME: &'static str = "AIS_VESSEL";
4911    const EXTRA_CRC: u8 = 243u8;
4912    const ENCODED_LEN: usize = 58usize;
4913    fn deser(
4914        _version: MavlinkVersion,
4915        __input: &[u8],
4916    ) -> Result<Self, ::mavlink_core::error::ParserError> {
4917        let avail_len = __input.len();
4918        let mut payload_buf = [0; Self::ENCODED_LEN];
4919        let mut buf = if avail_len < Self::ENCODED_LEN {
4920            payload_buf[0..avail_len].copy_from_slice(__input);
4921            Bytes::new(&payload_buf)
4922        } else {
4923            Bytes::new(__input)
4924        };
4925        let mut __struct = Self::default();
4926        __struct.MMSI = buf.get_u32_le();
4927        __struct.lat = buf.get_i32_le();
4928        __struct.lon = buf.get_i32_le();
4929        __struct.COG = buf.get_u16_le();
4930        __struct.heading = buf.get_u16_le();
4931        __struct.velocity = buf.get_u16_le();
4932        __struct.dimension_bow = buf.get_u16_le();
4933        __struct.dimension_stern = buf.get_u16_le();
4934        __struct.tslc = buf.get_u16_le();
4935        let tmp = buf.get_u16_le();
4936        __struct.flags = AisFlags::from_bits(tmp & AisFlags::all().bits()).ok_or(
4937            ::mavlink_core::error::ParserError::InvalidFlag {
4938                flag_type: "AisFlags",
4939                value: tmp as u32,
4940            },
4941        )?;
4942        __struct.turn_rate = buf.get_i8();
4943        let tmp = buf.get_u8();
4944        __struct.navigational_status =
4945            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4946                enum_type: "AisNavStatus",
4947                value: tmp as u32,
4948            })?;
4949        let tmp = buf.get_u8();
4950        __struct.mavtype =
4951            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
4952                enum_type: "AisType",
4953                value: tmp as u32,
4954            })?;
4955        __struct.dimension_port = buf.get_u8();
4956        __struct.dimension_starboard = buf.get_u8();
4957        for v in &mut __struct.callsign {
4958            let val = buf.get_u8();
4959            *v = val;
4960        }
4961        for v in &mut __struct.name {
4962            let val = buf.get_u8();
4963            *v = val;
4964        }
4965        Ok(__struct)
4966    }
4967    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
4968        let mut __tmp = BytesMut::new(bytes);
4969        #[allow(clippy::absurd_extreme_comparisons)]
4970        #[allow(unused_comparisons)]
4971        if __tmp.remaining() < Self::ENCODED_LEN {
4972            panic!(
4973                "buffer is too small (need {} bytes, but got {})",
4974                Self::ENCODED_LEN,
4975                __tmp.remaining(),
4976            )
4977        }
4978        __tmp.put_u32_le(self.MMSI);
4979        __tmp.put_i32_le(self.lat);
4980        __tmp.put_i32_le(self.lon);
4981        __tmp.put_u16_le(self.COG);
4982        __tmp.put_u16_le(self.heading);
4983        __tmp.put_u16_le(self.velocity);
4984        __tmp.put_u16_le(self.dimension_bow);
4985        __tmp.put_u16_le(self.dimension_stern);
4986        __tmp.put_u16_le(self.tslc);
4987        __tmp.put_u16_le(self.flags.bits());
4988        __tmp.put_i8(self.turn_rate);
4989        __tmp.put_u8(self.navigational_status as u8);
4990        __tmp.put_u8(self.mavtype as u8);
4991        __tmp.put_u8(self.dimension_port);
4992        __tmp.put_u8(self.dimension_starboard);
4993        for val in &self.callsign {
4994            __tmp.put_u8(*val);
4995        }
4996        for val in &self.name {
4997            __tmp.put_u8(*val);
4998        }
4999        if matches!(version, MavlinkVersion::V2) {
5000            let len = __tmp.len();
5001            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5002        } else {
5003            __tmp.len()
5004        }
5005    }
5006}
5007#[doc = "id: 141"]
5008#[doc = "The current system altitude."]
5009#[derive(Debug, Clone, PartialEq)]
5010#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5011#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5012pub struct ALTITUDE_DATA {
5013    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5014    pub time_usec: u64,
5015    #[doc = "This altitude measure is initialized on system boot and monotonic (it is never reset, but represents the local altitude change). The only guarantee on this field is that it will never be reset and is consistent within a flight. The recommended value for this field is the uncorrected barometric altitude at boot time. This altitude will also drift and vary between flights."]
5016    pub altitude_monotonic: f32,
5017    #[doc = "This altitude measure is strictly above mean sea level and might be non-monotonic (it might reset on events like GPS lock or when a new QNH value is set). It should be the altitude to which global altitude waypoints are compared to. Note that it is *not* the GPS altitude, however, most GPS modules already output MSL by default and not the WGS84 altitude."]
5018    pub altitude_amsl: f32,
5019    #[doc = "This is the local altitude in the local coordinate frame. It is not the altitude above home, but in reference to the coordinate origin (0, 0, 0). It is up-positive."]
5020    pub altitude_local: f32,
5021    #[doc = "This is the altitude above the home position. It resets on each change of the current home position."]
5022    pub altitude_relative: f32,
5023    #[doc = "This is the altitude above terrain. It might be fed by a terrain database or an altimeter. Values smaller than -1000 should be interpreted as unknown."]
5024    pub altitude_terrain: f32,
5025    #[doc = "This is not the altitude, but the clear space below the system according to the fused clearance estimate. It generally should max out at the maximum range of e.g. the laser altimeter. It is generally a moving target. A negative value indicates no measurement available."]
5026    pub bottom_clearance: f32,
5027}
5028impl ALTITUDE_DATA {
5029    pub const ENCODED_LEN: usize = 32usize;
5030    pub const DEFAULT: Self = Self {
5031        time_usec: 0_u64,
5032        altitude_monotonic: 0.0_f32,
5033        altitude_amsl: 0.0_f32,
5034        altitude_local: 0.0_f32,
5035        altitude_relative: 0.0_f32,
5036        altitude_terrain: 0.0_f32,
5037        bottom_clearance: 0.0_f32,
5038    };
5039    #[cfg(feature = "arbitrary")]
5040    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5041        use arbitrary::{Arbitrary, Unstructured};
5042        let mut buf = [0u8; 1024];
5043        rng.fill_bytes(&mut buf);
5044        let mut unstructured = Unstructured::new(&buf);
5045        Self::arbitrary(&mut unstructured).unwrap_or_default()
5046    }
5047}
5048impl Default for ALTITUDE_DATA {
5049    fn default() -> Self {
5050        Self::DEFAULT.clone()
5051    }
5052}
5053impl MessageData for ALTITUDE_DATA {
5054    type Message = MavMessage;
5055    const ID: u32 = 141u32;
5056    const NAME: &'static str = "ALTITUDE";
5057    const EXTRA_CRC: u8 = 47u8;
5058    const ENCODED_LEN: usize = 32usize;
5059    fn deser(
5060        _version: MavlinkVersion,
5061        __input: &[u8],
5062    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5063        let avail_len = __input.len();
5064        let mut payload_buf = [0; Self::ENCODED_LEN];
5065        let mut buf = if avail_len < Self::ENCODED_LEN {
5066            payload_buf[0..avail_len].copy_from_slice(__input);
5067            Bytes::new(&payload_buf)
5068        } else {
5069            Bytes::new(__input)
5070        };
5071        let mut __struct = Self::default();
5072        __struct.time_usec = buf.get_u64_le();
5073        __struct.altitude_monotonic = buf.get_f32_le();
5074        __struct.altitude_amsl = buf.get_f32_le();
5075        __struct.altitude_local = buf.get_f32_le();
5076        __struct.altitude_relative = buf.get_f32_le();
5077        __struct.altitude_terrain = buf.get_f32_le();
5078        __struct.bottom_clearance = buf.get_f32_le();
5079        Ok(__struct)
5080    }
5081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5082        let mut __tmp = BytesMut::new(bytes);
5083        #[allow(clippy::absurd_extreme_comparisons)]
5084        #[allow(unused_comparisons)]
5085        if __tmp.remaining() < Self::ENCODED_LEN {
5086            panic!(
5087                "buffer is too small (need {} bytes, but got {})",
5088                Self::ENCODED_LEN,
5089                __tmp.remaining(),
5090            )
5091        }
5092        __tmp.put_u64_le(self.time_usec);
5093        __tmp.put_f32_le(self.altitude_monotonic);
5094        __tmp.put_f32_le(self.altitude_amsl);
5095        __tmp.put_f32_le(self.altitude_local);
5096        __tmp.put_f32_le(self.altitude_relative);
5097        __tmp.put_f32_le(self.altitude_terrain);
5098        __tmp.put_f32_le(self.bottom_clearance);
5099        if matches!(version, MavlinkVersion::V2) {
5100            let len = __tmp.len();
5101            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5102        } else {
5103            __tmp.len()
5104        }
5105    }
5106}
5107#[doc = "id: 30"]
5108#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, Y-right, X-front, ZYX, intrinsic)."]
5109#[derive(Debug, Clone, PartialEq)]
5110#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5111#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5112pub struct ATTITUDE_DATA {
5113    #[doc = "Timestamp (time since system boot)."]
5114    pub time_boot_ms: u32,
5115    #[doc = "Roll angle (-pi..+pi)"]
5116    pub roll: f32,
5117    #[doc = "Pitch angle (-pi..+pi)"]
5118    pub pitch: f32,
5119    #[doc = "Yaw angle (-pi..+pi)"]
5120    pub yaw: f32,
5121    #[doc = "Roll angular speed"]
5122    pub rollspeed: f32,
5123    #[doc = "Pitch angular speed"]
5124    pub pitchspeed: f32,
5125    #[doc = "Yaw angular speed"]
5126    pub yawspeed: f32,
5127}
5128impl ATTITUDE_DATA {
5129    pub const ENCODED_LEN: usize = 28usize;
5130    pub const DEFAULT: Self = Self {
5131        time_boot_ms: 0_u32,
5132        roll: 0.0_f32,
5133        pitch: 0.0_f32,
5134        yaw: 0.0_f32,
5135        rollspeed: 0.0_f32,
5136        pitchspeed: 0.0_f32,
5137        yawspeed: 0.0_f32,
5138    };
5139    #[cfg(feature = "arbitrary")]
5140    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5141        use arbitrary::{Arbitrary, Unstructured};
5142        let mut buf = [0u8; 1024];
5143        rng.fill_bytes(&mut buf);
5144        let mut unstructured = Unstructured::new(&buf);
5145        Self::arbitrary(&mut unstructured).unwrap_or_default()
5146    }
5147}
5148impl Default for ATTITUDE_DATA {
5149    fn default() -> Self {
5150        Self::DEFAULT.clone()
5151    }
5152}
5153impl MessageData for ATTITUDE_DATA {
5154    type Message = MavMessage;
5155    const ID: u32 = 30u32;
5156    const NAME: &'static str = "ATTITUDE";
5157    const EXTRA_CRC: u8 = 39u8;
5158    const ENCODED_LEN: usize = 28usize;
5159    fn deser(
5160        _version: MavlinkVersion,
5161        __input: &[u8],
5162    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5163        let avail_len = __input.len();
5164        let mut payload_buf = [0; Self::ENCODED_LEN];
5165        let mut buf = if avail_len < Self::ENCODED_LEN {
5166            payload_buf[0..avail_len].copy_from_slice(__input);
5167            Bytes::new(&payload_buf)
5168        } else {
5169            Bytes::new(__input)
5170        };
5171        let mut __struct = Self::default();
5172        __struct.time_boot_ms = buf.get_u32_le();
5173        __struct.roll = buf.get_f32_le();
5174        __struct.pitch = buf.get_f32_le();
5175        __struct.yaw = buf.get_f32_le();
5176        __struct.rollspeed = buf.get_f32_le();
5177        __struct.pitchspeed = buf.get_f32_le();
5178        __struct.yawspeed = buf.get_f32_le();
5179        Ok(__struct)
5180    }
5181    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5182        let mut __tmp = BytesMut::new(bytes);
5183        #[allow(clippy::absurd_extreme_comparisons)]
5184        #[allow(unused_comparisons)]
5185        if __tmp.remaining() < Self::ENCODED_LEN {
5186            panic!(
5187                "buffer is too small (need {} bytes, but got {})",
5188                Self::ENCODED_LEN,
5189                __tmp.remaining(),
5190            )
5191        }
5192        __tmp.put_u32_le(self.time_boot_ms);
5193        __tmp.put_f32_le(self.roll);
5194        __tmp.put_f32_le(self.pitch);
5195        __tmp.put_f32_le(self.yaw);
5196        __tmp.put_f32_le(self.rollspeed);
5197        __tmp.put_f32_le(self.pitchspeed);
5198        __tmp.put_f32_le(self.yawspeed);
5199        if matches!(version, MavlinkVersion::V2) {
5200            let len = __tmp.len();
5201            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5202        } else {
5203            __tmp.len()
5204        }
5205    }
5206}
5207#[doc = "id: 31"]
5208#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5209#[derive(Debug, Clone, PartialEq)]
5210#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5211#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5212pub struct ATTITUDE_QUATERNION_DATA {
5213    #[doc = "Timestamp (time since system boot)."]
5214    pub time_boot_ms: u32,
5215    #[doc = "Quaternion component 1, w (1 in null-rotation)"]
5216    pub q1: f32,
5217    #[doc = "Quaternion component 2, x (0 in null-rotation)"]
5218    pub q2: f32,
5219    #[doc = "Quaternion component 3, y (0 in null-rotation)"]
5220    pub q3: f32,
5221    #[doc = "Quaternion component 4, z (0 in null-rotation)"]
5222    pub q4: f32,
5223    #[doc = "Roll angular speed"]
5224    pub rollspeed: f32,
5225    #[doc = "Pitch angular speed"]
5226    pub pitchspeed: f32,
5227    #[doc = "Yaw angular speed"]
5228    pub yawspeed: f32,
5229    #[doc = "Rotation offset by which the attitude quaternion and angular speed vector should be rotated for user display (quaternion with [w, x, y, z] order, zero-rotation is [1, 0, 0, 0], send [0, 0, 0, 0] if field not supported). This field is intended for systems in which the reference attitude may change during flight. For example, tailsitters VTOLs rotate their reference attitude by 90 degrees between hover mode and fixed wing mode, thus repr_offset_q is equal to [1, 0, 0, 0] in hover mode and equal to [0.7071, 0, 0.7071, 0] in fixed wing mode."]
5230    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5231    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5232    pub repr_offset_q: [f32; 4],
5233}
5234impl ATTITUDE_QUATERNION_DATA {
5235    pub const ENCODED_LEN: usize = 48usize;
5236    pub const DEFAULT: Self = Self {
5237        time_boot_ms: 0_u32,
5238        q1: 0.0_f32,
5239        q2: 0.0_f32,
5240        q3: 0.0_f32,
5241        q4: 0.0_f32,
5242        rollspeed: 0.0_f32,
5243        pitchspeed: 0.0_f32,
5244        yawspeed: 0.0_f32,
5245        repr_offset_q: [0.0_f32; 4usize],
5246    };
5247    #[cfg(feature = "arbitrary")]
5248    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5249        use arbitrary::{Arbitrary, Unstructured};
5250        let mut buf = [0u8; 1024];
5251        rng.fill_bytes(&mut buf);
5252        let mut unstructured = Unstructured::new(&buf);
5253        Self::arbitrary(&mut unstructured).unwrap_or_default()
5254    }
5255}
5256impl Default for ATTITUDE_QUATERNION_DATA {
5257    fn default() -> Self {
5258        Self::DEFAULT.clone()
5259    }
5260}
5261impl MessageData for ATTITUDE_QUATERNION_DATA {
5262    type Message = MavMessage;
5263    const ID: u32 = 31u32;
5264    const NAME: &'static str = "ATTITUDE_QUATERNION";
5265    const EXTRA_CRC: u8 = 246u8;
5266    const ENCODED_LEN: usize = 48usize;
5267    fn deser(
5268        _version: MavlinkVersion,
5269        __input: &[u8],
5270    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5271        let avail_len = __input.len();
5272        let mut payload_buf = [0; Self::ENCODED_LEN];
5273        let mut buf = if avail_len < Self::ENCODED_LEN {
5274            payload_buf[0..avail_len].copy_from_slice(__input);
5275            Bytes::new(&payload_buf)
5276        } else {
5277            Bytes::new(__input)
5278        };
5279        let mut __struct = Self::default();
5280        __struct.time_boot_ms = buf.get_u32_le();
5281        __struct.q1 = buf.get_f32_le();
5282        __struct.q2 = buf.get_f32_le();
5283        __struct.q3 = buf.get_f32_le();
5284        __struct.q4 = buf.get_f32_le();
5285        __struct.rollspeed = buf.get_f32_le();
5286        __struct.pitchspeed = buf.get_f32_le();
5287        __struct.yawspeed = buf.get_f32_le();
5288        for v in &mut __struct.repr_offset_q {
5289            let val = buf.get_f32_le();
5290            *v = val;
5291        }
5292        Ok(__struct)
5293    }
5294    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5295        let mut __tmp = BytesMut::new(bytes);
5296        #[allow(clippy::absurd_extreme_comparisons)]
5297        #[allow(unused_comparisons)]
5298        if __tmp.remaining() < Self::ENCODED_LEN {
5299            panic!(
5300                "buffer is too small (need {} bytes, but got {})",
5301                Self::ENCODED_LEN,
5302                __tmp.remaining(),
5303            )
5304        }
5305        __tmp.put_u32_le(self.time_boot_ms);
5306        __tmp.put_f32_le(self.q1);
5307        __tmp.put_f32_le(self.q2);
5308        __tmp.put_f32_le(self.q3);
5309        __tmp.put_f32_le(self.q4);
5310        __tmp.put_f32_le(self.rollspeed);
5311        __tmp.put_f32_le(self.pitchspeed);
5312        __tmp.put_f32_le(self.yawspeed);
5313        for val in &self.repr_offset_q {
5314            __tmp.put_f32_le(*val);
5315        }
5316        if matches!(version, MavlinkVersion::V2) {
5317            let len = __tmp.len();
5318            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5319        } else {
5320            __tmp.len()
5321        }
5322    }
5323}
5324#[doc = "id: 61"]
5325#[doc = "The attitude in the aeronautical frame (right-handed, Z-down, X-front, Y-right), expressed as quaternion. Quaternion order is w, x, y, z and a zero rotation would be expressed as (1 0 0 0)."]
5326#[derive(Debug, Clone, PartialEq)]
5327#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5328#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5329pub struct ATTITUDE_QUATERNION_COV_DATA {
5330    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5331    pub time_usec: u64,
5332    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
5333    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5334    pub q: [f32; 4],
5335    #[doc = "Roll angular speed"]
5336    pub rollspeed: f32,
5337    #[doc = "Pitch angular speed"]
5338    pub pitchspeed: f32,
5339    #[doc = "Yaw angular speed"]
5340    pub yawspeed: f32,
5341    #[doc = "Row-major representation of a 3x3 attitude covariance matrix (states: roll, pitch, yaw; first three entries are the first ROW, next three entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
5342    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5343    pub covariance: [f32; 9],
5344}
5345impl ATTITUDE_QUATERNION_COV_DATA {
5346    pub const ENCODED_LEN: usize = 72usize;
5347    pub const DEFAULT: Self = Self {
5348        time_usec: 0_u64,
5349        q: [0.0_f32; 4usize],
5350        rollspeed: 0.0_f32,
5351        pitchspeed: 0.0_f32,
5352        yawspeed: 0.0_f32,
5353        covariance: [0.0_f32; 9usize],
5354    };
5355    #[cfg(feature = "arbitrary")]
5356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5357        use arbitrary::{Arbitrary, Unstructured};
5358        let mut buf = [0u8; 1024];
5359        rng.fill_bytes(&mut buf);
5360        let mut unstructured = Unstructured::new(&buf);
5361        Self::arbitrary(&mut unstructured).unwrap_or_default()
5362    }
5363}
5364impl Default for ATTITUDE_QUATERNION_COV_DATA {
5365    fn default() -> Self {
5366        Self::DEFAULT.clone()
5367    }
5368}
5369impl MessageData for ATTITUDE_QUATERNION_COV_DATA {
5370    type Message = MavMessage;
5371    const ID: u32 = 61u32;
5372    const NAME: &'static str = "ATTITUDE_QUATERNION_COV";
5373    const EXTRA_CRC: u8 = 167u8;
5374    const ENCODED_LEN: usize = 72usize;
5375    fn deser(
5376        _version: MavlinkVersion,
5377        __input: &[u8],
5378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5379        let avail_len = __input.len();
5380        let mut payload_buf = [0; Self::ENCODED_LEN];
5381        let mut buf = if avail_len < Self::ENCODED_LEN {
5382            payload_buf[0..avail_len].copy_from_slice(__input);
5383            Bytes::new(&payload_buf)
5384        } else {
5385            Bytes::new(__input)
5386        };
5387        let mut __struct = Self::default();
5388        __struct.time_usec = buf.get_u64_le();
5389        for v in &mut __struct.q {
5390            let val = buf.get_f32_le();
5391            *v = val;
5392        }
5393        __struct.rollspeed = buf.get_f32_le();
5394        __struct.pitchspeed = buf.get_f32_le();
5395        __struct.yawspeed = buf.get_f32_le();
5396        for v in &mut __struct.covariance {
5397            let val = buf.get_f32_le();
5398            *v = val;
5399        }
5400        Ok(__struct)
5401    }
5402    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5403        let mut __tmp = BytesMut::new(bytes);
5404        #[allow(clippy::absurd_extreme_comparisons)]
5405        #[allow(unused_comparisons)]
5406        if __tmp.remaining() < Self::ENCODED_LEN {
5407            panic!(
5408                "buffer is too small (need {} bytes, but got {})",
5409                Self::ENCODED_LEN,
5410                __tmp.remaining(),
5411            )
5412        }
5413        __tmp.put_u64_le(self.time_usec);
5414        for val in &self.q {
5415            __tmp.put_f32_le(*val);
5416        }
5417        __tmp.put_f32_le(self.rollspeed);
5418        __tmp.put_f32_le(self.pitchspeed);
5419        __tmp.put_f32_le(self.yawspeed);
5420        for val in &self.covariance {
5421            __tmp.put_f32_le(*val);
5422        }
5423        if matches!(version, MavlinkVersion::V2) {
5424            let len = __tmp.len();
5425            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5426        } else {
5427            __tmp.len()
5428        }
5429    }
5430}
5431#[doc = "id: 83"]
5432#[doc = "Reports the current commanded attitude of the vehicle as specified by the autopilot. This should match the commands sent in a SET_ATTITUDE_TARGET message if the vehicle is being controlled this way."]
5433#[derive(Debug, Clone, PartialEq)]
5434#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5435#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5436pub struct ATTITUDE_TARGET_DATA {
5437    #[doc = "Timestamp (time since system boot)."]
5438    pub time_boot_ms: u32,
5439    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5440    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5441    pub q: [f32; 4],
5442    #[doc = "Body roll rate"]
5443    pub body_roll_rate: f32,
5444    #[doc = "Body pitch rate"]
5445    pub body_pitch_rate: f32,
5446    #[doc = "Body yaw rate"]
5447    pub body_yaw_rate: f32,
5448    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
5449    pub thrust: f32,
5450    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
5451    pub type_mask: AttitudeTargetTypemask,
5452}
5453impl ATTITUDE_TARGET_DATA {
5454    pub const ENCODED_LEN: usize = 37usize;
5455    pub const DEFAULT: Self = Self {
5456        time_boot_ms: 0_u32,
5457        q: [0.0_f32; 4usize],
5458        body_roll_rate: 0.0_f32,
5459        body_pitch_rate: 0.0_f32,
5460        body_yaw_rate: 0.0_f32,
5461        thrust: 0.0_f32,
5462        type_mask: AttitudeTargetTypemask::DEFAULT,
5463    };
5464    #[cfg(feature = "arbitrary")]
5465    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5466        use arbitrary::{Arbitrary, Unstructured};
5467        let mut buf = [0u8; 1024];
5468        rng.fill_bytes(&mut buf);
5469        let mut unstructured = Unstructured::new(&buf);
5470        Self::arbitrary(&mut unstructured).unwrap_or_default()
5471    }
5472}
5473impl Default for ATTITUDE_TARGET_DATA {
5474    fn default() -> Self {
5475        Self::DEFAULT.clone()
5476    }
5477}
5478impl MessageData for ATTITUDE_TARGET_DATA {
5479    type Message = MavMessage;
5480    const ID: u32 = 83u32;
5481    const NAME: &'static str = "ATTITUDE_TARGET";
5482    const EXTRA_CRC: u8 = 22u8;
5483    const ENCODED_LEN: usize = 37usize;
5484    fn deser(
5485        _version: MavlinkVersion,
5486        __input: &[u8],
5487    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5488        let avail_len = __input.len();
5489        let mut payload_buf = [0; Self::ENCODED_LEN];
5490        let mut buf = if avail_len < Self::ENCODED_LEN {
5491            payload_buf[0..avail_len].copy_from_slice(__input);
5492            Bytes::new(&payload_buf)
5493        } else {
5494            Bytes::new(__input)
5495        };
5496        let mut __struct = Self::default();
5497        __struct.time_boot_ms = buf.get_u32_le();
5498        for v in &mut __struct.q {
5499            let val = buf.get_f32_le();
5500            *v = val;
5501        }
5502        __struct.body_roll_rate = buf.get_f32_le();
5503        __struct.body_pitch_rate = buf.get_f32_le();
5504        __struct.body_yaw_rate = buf.get_f32_le();
5505        __struct.thrust = buf.get_f32_le();
5506        let tmp = buf.get_u8();
5507        __struct.type_mask = AttitudeTargetTypemask::from_bits(
5508            tmp & AttitudeTargetTypemask::all().bits(),
5509        )
5510        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5511            flag_type: "AttitudeTargetTypemask",
5512            value: tmp as u32,
5513        })?;
5514        Ok(__struct)
5515    }
5516    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5517        let mut __tmp = BytesMut::new(bytes);
5518        #[allow(clippy::absurd_extreme_comparisons)]
5519        #[allow(unused_comparisons)]
5520        if __tmp.remaining() < Self::ENCODED_LEN {
5521            panic!(
5522                "buffer is too small (need {} bytes, but got {})",
5523                Self::ENCODED_LEN,
5524                __tmp.remaining(),
5525            )
5526        }
5527        __tmp.put_u32_le(self.time_boot_ms);
5528        for val in &self.q {
5529            __tmp.put_f32_le(*val);
5530        }
5531        __tmp.put_f32_le(self.body_roll_rate);
5532        __tmp.put_f32_le(self.body_pitch_rate);
5533        __tmp.put_f32_le(self.body_yaw_rate);
5534        __tmp.put_f32_le(self.thrust);
5535        __tmp.put_u8(self.type_mask.bits());
5536        if matches!(version, MavlinkVersion::V2) {
5537            let len = __tmp.len();
5538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5539        } else {
5540            __tmp.len()
5541        }
5542    }
5543}
5544#[doc = "id: 138"]
5545#[doc = "Motion capture attitude and position."]
5546#[derive(Debug, Clone, PartialEq)]
5547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5549pub struct ATT_POS_MOCAP_DATA {
5550    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
5551    pub time_usec: u64,
5552    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
5553    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5554    pub q: [f32; 4],
5555    #[doc = "X position (NED)"]
5556    pub x: f32,
5557    #[doc = "Y position (NED)"]
5558    pub y: f32,
5559    #[doc = "Z position (NED)"]
5560    pub z: f32,
5561    #[doc = "Row-major representation of a pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
5562    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5563    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5564    pub covariance: [f32; 21],
5565}
5566impl ATT_POS_MOCAP_DATA {
5567    pub const ENCODED_LEN: usize = 120usize;
5568    pub const DEFAULT: Self = Self {
5569        time_usec: 0_u64,
5570        q: [0.0_f32; 4usize],
5571        x: 0.0_f32,
5572        y: 0.0_f32,
5573        z: 0.0_f32,
5574        covariance: [0.0_f32; 21usize],
5575    };
5576    #[cfg(feature = "arbitrary")]
5577    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5578        use arbitrary::{Arbitrary, Unstructured};
5579        let mut buf = [0u8; 1024];
5580        rng.fill_bytes(&mut buf);
5581        let mut unstructured = Unstructured::new(&buf);
5582        Self::arbitrary(&mut unstructured).unwrap_or_default()
5583    }
5584}
5585impl Default for ATT_POS_MOCAP_DATA {
5586    fn default() -> Self {
5587        Self::DEFAULT.clone()
5588    }
5589}
5590impl MessageData for ATT_POS_MOCAP_DATA {
5591    type Message = MavMessage;
5592    const ID: u32 = 138u32;
5593    const NAME: &'static str = "ATT_POS_MOCAP";
5594    const EXTRA_CRC: u8 = 109u8;
5595    const ENCODED_LEN: usize = 120usize;
5596    fn deser(
5597        _version: MavlinkVersion,
5598        __input: &[u8],
5599    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5600        let avail_len = __input.len();
5601        let mut payload_buf = [0; Self::ENCODED_LEN];
5602        let mut buf = if avail_len < Self::ENCODED_LEN {
5603            payload_buf[0..avail_len].copy_from_slice(__input);
5604            Bytes::new(&payload_buf)
5605        } else {
5606            Bytes::new(__input)
5607        };
5608        let mut __struct = Self::default();
5609        __struct.time_usec = buf.get_u64_le();
5610        for v in &mut __struct.q {
5611            let val = buf.get_f32_le();
5612            *v = val;
5613        }
5614        __struct.x = buf.get_f32_le();
5615        __struct.y = buf.get_f32_le();
5616        __struct.z = buf.get_f32_le();
5617        for v in &mut __struct.covariance {
5618            let val = buf.get_f32_le();
5619            *v = val;
5620        }
5621        Ok(__struct)
5622    }
5623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5624        let mut __tmp = BytesMut::new(bytes);
5625        #[allow(clippy::absurd_extreme_comparisons)]
5626        #[allow(unused_comparisons)]
5627        if __tmp.remaining() < Self::ENCODED_LEN {
5628            panic!(
5629                "buffer is too small (need {} bytes, but got {})",
5630                Self::ENCODED_LEN,
5631                __tmp.remaining(),
5632            )
5633        }
5634        __tmp.put_u64_le(self.time_usec);
5635        for val in &self.q {
5636            __tmp.put_f32_le(*val);
5637        }
5638        __tmp.put_f32_le(self.x);
5639        __tmp.put_f32_le(self.y);
5640        __tmp.put_f32_le(self.z);
5641        for val in &self.covariance {
5642            __tmp.put_f32_le(*val);
5643        }
5644        if matches!(version, MavlinkVersion::V2) {
5645            let len = __tmp.len();
5646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5647        } else {
5648            __tmp.len()
5649        }
5650    }
5651}
5652#[doc = "id: 7"]
5653#[doc = "Emit an encrypted signature / key identifying this system. PLEASE NOTE: This protocol has been kept simple, so transmitting the key requires an encrypted channel for true safety."]
5654#[derive(Debug, Clone, PartialEq)]
5655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5657pub struct AUTH_KEY_DATA {
5658    #[doc = "key"]
5659    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5660    pub key: [u8; 32],
5661}
5662impl AUTH_KEY_DATA {
5663    pub const ENCODED_LEN: usize = 32usize;
5664    pub const DEFAULT: Self = Self {
5665        key: [0_u8; 32usize],
5666    };
5667    #[cfg(feature = "arbitrary")]
5668    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5669        use arbitrary::{Arbitrary, Unstructured};
5670        let mut buf = [0u8; 1024];
5671        rng.fill_bytes(&mut buf);
5672        let mut unstructured = Unstructured::new(&buf);
5673        Self::arbitrary(&mut unstructured).unwrap_or_default()
5674    }
5675}
5676impl Default for AUTH_KEY_DATA {
5677    fn default() -> Self {
5678        Self::DEFAULT.clone()
5679    }
5680}
5681impl MessageData for AUTH_KEY_DATA {
5682    type Message = MavMessage;
5683    const ID: u32 = 7u32;
5684    const NAME: &'static str = "AUTH_KEY";
5685    const EXTRA_CRC: u8 = 119u8;
5686    const ENCODED_LEN: usize = 32usize;
5687    fn deser(
5688        _version: MavlinkVersion,
5689        __input: &[u8],
5690    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5691        let avail_len = __input.len();
5692        let mut payload_buf = [0; Self::ENCODED_LEN];
5693        let mut buf = if avail_len < Self::ENCODED_LEN {
5694            payload_buf[0..avail_len].copy_from_slice(__input);
5695            Bytes::new(&payload_buf)
5696        } else {
5697            Bytes::new(__input)
5698        };
5699        let mut __struct = Self::default();
5700        for v in &mut __struct.key {
5701            let val = buf.get_u8();
5702            *v = val;
5703        }
5704        Ok(__struct)
5705    }
5706    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5707        let mut __tmp = BytesMut::new(bytes);
5708        #[allow(clippy::absurd_extreme_comparisons)]
5709        #[allow(unused_comparisons)]
5710        if __tmp.remaining() < Self::ENCODED_LEN {
5711            panic!(
5712                "buffer is too small (need {} bytes, but got {})",
5713                Self::ENCODED_LEN,
5714                __tmp.remaining(),
5715            )
5716        }
5717        for val in &self.key {
5718            __tmp.put_u8(*val);
5719        }
5720        if matches!(version, MavlinkVersion::V2) {
5721            let len = __tmp.len();
5722            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5723        } else {
5724            __tmp.len()
5725        }
5726    }
5727}
5728#[doc = "id: 286"]
5729#[doc = "Low level message containing autopilot state relevant for a gimbal device. This message is to be sent from the autopilot to the gimbal device component. The data of this message are for the gimbal device's estimator corrections, in particular horizon compensation, as well as indicates autopilot control intentions, e.g. feed forward angular control in the z-axis."]
5730#[derive(Debug, Clone, PartialEq)]
5731#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5732#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5733pub struct AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5734    #[doc = "Timestamp (time since system boot)."]
5735    pub time_boot_us: u64,
5736    #[doc = "Quaternion components of autopilot attitude: w, x, y, z (1 0 0 0 is the null-rotation, Hamilton convention)."]
5737    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5738    pub q: [f32; 4],
5739    #[doc = "Estimated delay of the attitude data. 0 if unknown."]
5740    pub q_estimated_delay_us: u32,
5741    #[doc = "X Speed in NED (North, East, Down). NAN if unknown."]
5742    pub vx: f32,
5743    #[doc = "Y Speed in NED (North, East, Down). NAN if unknown."]
5744    pub vy: f32,
5745    #[doc = "Z Speed in NED (North, East, Down). NAN if unknown."]
5746    pub vz: f32,
5747    #[doc = "Estimated delay of the speed data. 0 if unknown."]
5748    pub v_estimated_delay_us: u32,
5749    #[doc = "Feed forward Z component of angular velocity (positive: yawing to the right). NaN to be ignored. This is to indicate if the autopilot is actively yawing."]
5750    pub feed_forward_angular_velocity_z: f32,
5751    #[doc = "Bitmap indicating which estimator outputs are valid."]
5752    pub estimator_status: EstimatorStatusFlags,
5753    #[doc = "System ID"]
5754    pub target_system: u8,
5755    #[doc = "Component ID"]
5756    pub target_component: u8,
5757    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
5758    pub landed_state: MavLandedState,
5759    #[doc = "Z component of angular velocity in NED (North, East, Down). NaN if unknown."]
5760    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5761    pub angular_velocity_z: f32,
5762}
5763impl AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5764    pub const ENCODED_LEN: usize = 57usize;
5765    pub const DEFAULT: Self = Self {
5766        time_boot_us: 0_u64,
5767        q: [0.0_f32; 4usize],
5768        q_estimated_delay_us: 0_u32,
5769        vx: 0.0_f32,
5770        vy: 0.0_f32,
5771        vz: 0.0_f32,
5772        v_estimated_delay_us: 0_u32,
5773        feed_forward_angular_velocity_z: 0.0_f32,
5774        estimator_status: EstimatorStatusFlags::DEFAULT,
5775        target_system: 0_u8,
5776        target_component: 0_u8,
5777        landed_state: MavLandedState::DEFAULT,
5778        angular_velocity_z: 0.0_f32,
5779    };
5780    #[cfg(feature = "arbitrary")]
5781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5782        use arbitrary::{Arbitrary, Unstructured};
5783        let mut buf = [0u8; 1024];
5784        rng.fill_bytes(&mut buf);
5785        let mut unstructured = Unstructured::new(&buf);
5786        Self::arbitrary(&mut unstructured).unwrap_or_default()
5787    }
5788}
5789impl Default for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5790    fn default() -> Self {
5791        Self::DEFAULT.clone()
5792    }
5793}
5794impl MessageData for AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA {
5795    type Message = MavMessage;
5796    const ID: u32 = 286u32;
5797    const NAME: &'static str = "AUTOPILOT_STATE_FOR_GIMBAL_DEVICE";
5798    const EXTRA_CRC: u8 = 210u8;
5799    const ENCODED_LEN: usize = 57usize;
5800    fn deser(
5801        _version: MavlinkVersion,
5802        __input: &[u8],
5803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5804        let avail_len = __input.len();
5805        let mut payload_buf = [0; Self::ENCODED_LEN];
5806        let mut buf = if avail_len < Self::ENCODED_LEN {
5807            payload_buf[0..avail_len].copy_from_slice(__input);
5808            Bytes::new(&payload_buf)
5809        } else {
5810            Bytes::new(__input)
5811        };
5812        let mut __struct = Self::default();
5813        __struct.time_boot_us = buf.get_u64_le();
5814        for v in &mut __struct.q {
5815            let val = buf.get_f32_le();
5816            *v = val;
5817        }
5818        __struct.q_estimated_delay_us = buf.get_u32_le();
5819        __struct.vx = buf.get_f32_le();
5820        __struct.vy = buf.get_f32_le();
5821        __struct.vz = buf.get_f32_le();
5822        __struct.v_estimated_delay_us = buf.get_u32_le();
5823        __struct.feed_forward_angular_velocity_z = buf.get_f32_le();
5824        let tmp = buf.get_u16_le();
5825        __struct.estimator_status = EstimatorStatusFlags::from_bits(
5826            tmp & EstimatorStatusFlags::all().bits(),
5827        )
5828        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5829            flag_type: "EstimatorStatusFlags",
5830            value: tmp as u32,
5831        })?;
5832        __struct.target_system = buf.get_u8();
5833        __struct.target_component = buf.get_u8();
5834        let tmp = buf.get_u8();
5835        __struct.landed_state =
5836            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
5837                enum_type: "MavLandedState",
5838                value: tmp as u32,
5839            })?;
5840        __struct.angular_velocity_z = buf.get_f32_le();
5841        Ok(__struct)
5842    }
5843    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5844        let mut __tmp = BytesMut::new(bytes);
5845        #[allow(clippy::absurd_extreme_comparisons)]
5846        #[allow(unused_comparisons)]
5847        if __tmp.remaining() < Self::ENCODED_LEN {
5848            panic!(
5849                "buffer is too small (need {} bytes, but got {})",
5850                Self::ENCODED_LEN,
5851                __tmp.remaining(),
5852            )
5853        }
5854        __tmp.put_u64_le(self.time_boot_us);
5855        for val in &self.q {
5856            __tmp.put_f32_le(*val);
5857        }
5858        __tmp.put_u32_le(self.q_estimated_delay_us);
5859        __tmp.put_f32_le(self.vx);
5860        __tmp.put_f32_le(self.vy);
5861        __tmp.put_f32_le(self.vz);
5862        __tmp.put_u32_le(self.v_estimated_delay_us);
5863        __tmp.put_f32_le(self.feed_forward_angular_velocity_z);
5864        __tmp.put_u16_le(self.estimator_status.bits());
5865        __tmp.put_u8(self.target_system);
5866        __tmp.put_u8(self.target_component);
5867        __tmp.put_u8(self.landed_state as u8);
5868        __tmp.put_f32_le(self.angular_velocity_z);
5869        if matches!(version, MavlinkVersion::V2) {
5870            let len = __tmp.len();
5871            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
5872        } else {
5873            __tmp.len()
5874        }
5875    }
5876}
5877#[doc = "id: 148"]
5878#[doc = "Version and capability of autopilot software. This should be emitted in response to a request with MAV_CMD_REQUEST_MESSAGE."]
5879#[derive(Debug, Clone, PartialEq)]
5880#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
5881#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
5882pub struct AUTOPILOT_VERSION_DATA {
5883    #[doc = "Bitmap of capabilities"]
5884    pub capabilities: MavProtocolCapability,
5885    #[doc = "UID if provided by hardware (see uid2)"]
5886    pub uid: u64,
5887    #[doc = "Firmware version number.         The field must be encoded as 4 bytes, where each byte (shown from MSB to LSB) is part of a semantic version: (major) (minor) (patch) (FIRMWARE_VERSION_TYPE)."]
5888    pub flight_sw_version: u32,
5889    #[doc = "Middleware version number"]
5890    pub middleware_sw_version: u32,
5891    #[doc = "Operating system version number"]
5892    pub os_sw_version: u32,
5893    #[doc = "HW / board version (last 8 bits should be silicon ID, if any). The first 16 bits of this field specify <https://github.com/PX4/PX4-Bootloader/blob/master/board_types.txt>"]
5894    pub board_version: u32,
5895    #[doc = "ID of the board vendor"]
5896    pub vendor_id: u16,
5897    #[doc = "ID of the product"]
5898    pub product_id: u16,
5899    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5900    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5901    pub flight_custom_version: [u8; 8],
5902    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5903    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5904    pub middleware_custom_version: [u8; 8],
5905    #[doc = "Custom version field, commonly the first 8 bytes of the git hash. This is not an unique identifier, but should allow to identify the commit using the main version number even for very large code bases."]
5906    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5907    pub os_custom_version: [u8; 8],
5908    #[doc = "UID if provided by hardware (supersedes the uid field. If this is non-zero, use this field, otherwise use uid)"]
5909    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
5910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
5911    pub uid2: [u8; 18],
5912}
5913impl AUTOPILOT_VERSION_DATA {
5914    pub const ENCODED_LEN: usize = 78usize;
5915    pub const DEFAULT: Self = Self {
5916        capabilities: MavProtocolCapability::DEFAULT,
5917        uid: 0_u64,
5918        flight_sw_version: 0_u32,
5919        middleware_sw_version: 0_u32,
5920        os_sw_version: 0_u32,
5921        board_version: 0_u32,
5922        vendor_id: 0_u16,
5923        product_id: 0_u16,
5924        flight_custom_version: [0_u8; 8usize],
5925        middleware_custom_version: [0_u8; 8usize],
5926        os_custom_version: [0_u8; 8usize],
5927        uid2: [0_u8; 18usize],
5928    };
5929    #[cfg(feature = "arbitrary")]
5930    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
5931        use arbitrary::{Arbitrary, Unstructured};
5932        let mut buf = [0u8; 1024];
5933        rng.fill_bytes(&mut buf);
5934        let mut unstructured = Unstructured::new(&buf);
5935        Self::arbitrary(&mut unstructured).unwrap_or_default()
5936    }
5937}
5938impl Default for AUTOPILOT_VERSION_DATA {
5939    fn default() -> Self {
5940        Self::DEFAULT.clone()
5941    }
5942}
5943impl MessageData for AUTOPILOT_VERSION_DATA {
5944    type Message = MavMessage;
5945    const ID: u32 = 148u32;
5946    const NAME: &'static str = "AUTOPILOT_VERSION";
5947    const EXTRA_CRC: u8 = 178u8;
5948    const ENCODED_LEN: usize = 78usize;
5949    fn deser(
5950        _version: MavlinkVersion,
5951        __input: &[u8],
5952    ) -> Result<Self, ::mavlink_core::error::ParserError> {
5953        let avail_len = __input.len();
5954        let mut payload_buf = [0; Self::ENCODED_LEN];
5955        let mut buf = if avail_len < Self::ENCODED_LEN {
5956            payload_buf[0..avail_len].copy_from_slice(__input);
5957            Bytes::new(&payload_buf)
5958        } else {
5959            Bytes::new(__input)
5960        };
5961        let mut __struct = Self::default();
5962        let tmp = buf.get_u64_le();
5963        __struct.capabilities = MavProtocolCapability::from_bits(
5964            tmp & MavProtocolCapability::all().bits(),
5965        )
5966        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
5967            flag_type: "MavProtocolCapability",
5968            value: tmp as u32,
5969        })?;
5970        __struct.uid = buf.get_u64_le();
5971        __struct.flight_sw_version = buf.get_u32_le();
5972        __struct.middleware_sw_version = buf.get_u32_le();
5973        __struct.os_sw_version = buf.get_u32_le();
5974        __struct.board_version = buf.get_u32_le();
5975        __struct.vendor_id = buf.get_u16_le();
5976        __struct.product_id = buf.get_u16_le();
5977        for v in &mut __struct.flight_custom_version {
5978            let val = buf.get_u8();
5979            *v = val;
5980        }
5981        for v in &mut __struct.middleware_custom_version {
5982            let val = buf.get_u8();
5983            *v = val;
5984        }
5985        for v in &mut __struct.os_custom_version {
5986            let val = buf.get_u8();
5987            *v = val;
5988        }
5989        for v in &mut __struct.uid2 {
5990            let val = buf.get_u8();
5991            *v = val;
5992        }
5993        Ok(__struct)
5994    }
5995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
5996        let mut __tmp = BytesMut::new(bytes);
5997        #[allow(clippy::absurd_extreme_comparisons)]
5998        #[allow(unused_comparisons)]
5999        if __tmp.remaining() < Self::ENCODED_LEN {
6000            panic!(
6001                "buffer is too small (need {} bytes, but got {})",
6002                Self::ENCODED_LEN,
6003                __tmp.remaining(),
6004            )
6005        }
6006        __tmp.put_u64_le(self.capabilities.bits());
6007        __tmp.put_u64_le(self.uid);
6008        __tmp.put_u32_le(self.flight_sw_version);
6009        __tmp.put_u32_le(self.middleware_sw_version);
6010        __tmp.put_u32_le(self.os_sw_version);
6011        __tmp.put_u32_le(self.board_version);
6012        __tmp.put_u16_le(self.vendor_id);
6013        __tmp.put_u16_le(self.product_id);
6014        for val in &self.flight_custom_version {
6015            __tmp.put_u8(*val);
6016        }
6017        for val in &self.middleware_custom_version {
6018            __tmp.put_u8(*val);
6019        }
6020        for val in &self.os_custom_version {
6021            __tmp.put_u8(*val);
6022        }
6023        for val in &self.uid2 {
6024            __tmp.put_u8(*val);
6025        }
6026        if matches!(version, MavlinkVersion::V2) {
6027            let len = __tmp.len();
6028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6029        } else {
6030            __tmp.len()
6031        }
6032    }
6033}
6034#[doc = "id: 435"]
6035#[doc = "Information about a flight mode.          The message can be enumerated to get information for all modes, or requested for a particular mode, using MAV_CMD_REQUEST_MESSAGE.         Specify 0 in param2 to request that the message is emitted for all available modes or the specific index for just one mode.         The modes must be available/settable for the current vehicle/frame type.         Each mode should only be emitted once (even if it is both standard and custom).         Note that the current mode should be emitted in CURRENT_MODE, and that if the mode list can change then AVAILABLE_MODES_MONITOR must be emitted on first change and subsequently streamed.         See <https://mavlink.io/en/services/standard_modes.html>."]
6036#[derive(Debug, Clone, PartialEq)]
6037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6039pub struct AVAILABLE_MODES_DATA {
6040    #[doc = "A bitfield for use for autopilot-specific flags"]
6041    pub custom_mode: u32,
6042    #[doc = "Mode properties."]
6043    pub properties: MavModeProperty,
6044    #[doc = "The total number of available modes for the current vehicle type."]
6045    pub number_modes: u8,
6046    #[doc = "The current mode index within number_modes, indexed from 1. The index is not guaranteed to be persistent, and may change between reboots or if the set of modes change."]
6047    pub mode_index: u8,
6048    #[doc = "Standard mode."]
6049    pub standard_mode: MavStandardMode,
6050    #[doc = "Name of custom mode, with null termination character. Should be omitted for standard modes."]
6051    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6052    pub mode_name: [u8; 35],
6053}
6054impl AVAILABLE_MODES_DATA {
6055    pub const ENCODED_LEN: usize = 46usize;
6056    pub const DEFAULT: Self = Self {
6057        custom_mode: 0_u32,
6058        properties: MavModeProperty::DEFAULT,
6059        number_modes: 0_u8,
6060        mode_index: 0_u8,
6061        standard_mode: MavStandardMode::DEFAULT,
6062        mode_name: [0_u8; 35usize],
6063    };
6064    #[cfg(feature = "arbitrary")]
6065    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6066        use arbitrary::{Arbitrary, Unstructured};
6067        let mut buf = [0u8; 1024];
6068        rng.fill_bytes(&mut buf);
6069        let mut unstructured = Unstructured::new(&buf);
6070        Self::arbitrary(&mut unstructured).unwrap_or_default()
6071    }
6072}
6073impl Default for AVAILABLE_MODES_DATA {
6074    fn default() -> Self {
6075        Self::DEFAULT.clone()
6076    }
6077}
6078impl MessageData for AVAILABLE_MODES_DATA {
6079    type Message = MavMessage;
6080    const ID: u32 = 435u32;
6081    const NAME: &'static str = "AVAILABLE_MODES";
6082    const EXTRA_CRC: u8 = 134u8;
6083    const ENCODED_LEN: usize = 46usize;
6084    fn deser(
6085        _version: MavlinkVersion,
6086        __input: &[u8],
6087    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6088        let avail_len = __input.len();
6089        let mut payload_buf = [0; Self::ENCODED_LEN];
6090        let mut buf = if avail_len < Self::ENCODED_LEN {
6091            payload_buf[0..avail_len].copy_from_slice(__input);
6092            Bytes::new(&payload_buf)
6093        } else {
6094            Bytes::new(__input)
6095        };
6096        let mut __struct = Self::default();
6097        __struct.custom_mode = buf.get_u32_le();
6098        let tmp = buf.get_u32_le();
6099        __struct.properties = MavModeProperty::from_bits(tmp & MavModeProperty::all().bits())
6100            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6101                flag_type: "MavModeProperty",
6102                value: tmp as u32,
6103            })?;
6104        __struct.number_modes = buf.get_u8();
6105        __struct.mode_index = buf.get_u8();
6106        let tmp = buf.get_u8();
6107        __struct.standard_mode =
6108            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6109                enum_type: "MavStandardMode",
6110                value: tmp as u32,
6111            })?;
6112        for v in &mut __struct.mode_name {
6113            let val = buf.get_u8();
6114            *v = val;
6115        }
6116        Ok(__struct)
6117    }
6118    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6119        let mut __tmp = BytesMut::new(bytes);
6120        #[allow(clippy::absurd_extreme_comparisons)]
6121        #[allow(unused_comparisons)]
6122        if __tmp.remaining() < Self::ENCODED_LEN {
6123            panic!(
6124                "buffer is too small (need {} bytes, but got {})",
6125                Self::ENCODED_LEN,
6126                __tmp.remaining(),
6127            )
6128        }
6129        __tmp.put_u32_le(self.custom_mode);
6130        __tmp.put_u32_le(self.properties.bits());
6131        __tmp.put_u8(self.number_modes);
6132        __tmp.put_u8(self.mode_index);
6133        __tmp.put_u8(self.standard_mode as u8);
6134        for val in &self.mode_name {
6135            __tmp.put_u8(*val);
6136        }
6137        if matches!(version, MavlinkVersion::V2) {
6138            let len = __tmp.len();
6139            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6140        } else {
6141            __tmp.len()
6142        }
6143    }
6144}
6145#[doc = "id: 437"]
6146#[doc = "A change to the sequence number indicates that the set of AVAILABLE_MODES has changed.         A receiver must re-request all available modes whenever the sequence number changes.         This is only emitted after the first change and should then be broadcast at low rate (nominally 0.3 Hz) and on change.         See <https://mavlink.io/en/services/standard_modes.html>."]
6147#[derive(Debug, Clone, PartialEq)]
6148#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6149#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6150pub struct AVAILABLE_MODES_MONITOR_DATA {
6151    #[doc = "Sequence number. The value iterates sequentially whenever AVAILABLE_MODES changes (e.g. support for a new mode is added/removed dynamically)."]
6152    pub seq: u8,
6153}
6154impl AVAILABLE_MODES_MONITOR_DATA {
6155    pub const ENCODED_LEN: usize = 1usize;
6156    pub const DEFAULT: Self = Self { seq: 0_u8 };
6157    #[cfg(feature = "arbitrary")]
6158    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6159        use arbitrary::{Arbitrary, Unstructured};
6160        let mut buf = [0u8; 1024];
6161        rng.fill_bytes(&mut buf);
6162        let mut unstructured = Unstructured::new(&buf);
6163        Self::arbitrary(&mut unstructured).unwrap_or_default()
6164    }
6165}
6166impl Default for AVAILABLE_MODES_MONITOR_DATA {
6167    fn default() -> Self {
6168        Self::DEFAULT.clone()
6169    }
6170}
6171impl MessageData for AVAILABLE_MODES_MONITOR_DATA {
6172    type Message = MavMessage;
6173    const ID: u32 = 437u32;
6174    const NAME: &'static str = "AVAILABLE_MODES_MONITOR";
6175    const EXTRA_CRC: u8 = 30u8;
6176    const ENCODED_LEN: usize = 1usize;
6177    fn deser(
6178        _version: MavlinkVersion,
6179        __input: &[u8],
6180    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6181        let avail_len = __input.len();
6182        let mut payload_buf = [0; Self::ENCODED_LEN];
6183        let mut buf = if avail_len < Self::ENCODED_LEN {
6184            payload_buf[0..avail_len].copy_from_slice(__input);
6185            Bytes::new(&payload_buf)
6186        } else {
6187            Bytes::new(__input)
6188        };
6189        let mut __struct = Self::default();
6190        __struct.seq = buf.get_u8();
6191        Ok(__struct)
6192    }
6193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6194        let mut __tmp = BytesMut::new(bytes);
6195        #[allow(clippy::absurd_extreme_comparisons)]
6196        #[allow(unused_comparisons)]
6197        if __tmp.remaining() < Self::ENCODED_LEN {
6198            panic!(
6199                "buffer is too small (need {} bytes, but got {})",
6200                Self::ENCODED_LEN,
6201                __tmp.remaining(),
6202            )
6203        }
6204        __tmp.put_u8(self.seq);
6205        if matches!(version, MavlinkVersion::V2) {
6206            let len = __tmp.len();
6207            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6208        } else {
6209            __tmp.len()
6210        }
6211    }
6212}
6213#[doc = "id: 372"]
6214#[doc = "Battery information that is static, or requires infrequent update.         This message should requested using MAV_CMD_REQUEST_MESSAGE and/or streamed at very low rate.         BATTERY_STATUS_V2 is used for higher-rate battery status information."]
6215#[derive(Debug, Clone, PartialEq)]
6216#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6217#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6218pub struct BATTERY_INFO_DATA {
6219    #[doc = "Minimum per-cell voltage when discharging. 0: field not provided."]
6220    pub discharge_minimum_voltage: f32,
6221    #[doc = "Minimum per-cell voltage when charging. 0: field not provided."]
6222    pub charging_minimum_voltage: f32,
6223    #[doc = "Minimum per-cell voltage when resting. 0: field not provided."]
6224    pub resting_minimum_voltage: f32,
6225    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
6226    pub charging_maximum_voltage: f32,
6227    #[doc = "Maximum pack continuous charge current. 0: field not provided."]
6228    pub charging_maximum_current: f32,
6229    #[doc = "Battery nominal voltage. Used for conversion between Wh and Ah. 0: field not provided."]
6230    pub nominal_voltage: f32,
6231    #[doc = "Maximum pack discharge current. 0: field not provided."]
6232    pub discharge_maximum_current: f32,
6233    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
6234    pub discharge_maximum_burst_current: f32,
6235    #[doc = "Fully charged design capacity. 0: field not provided."]
6236    pub design_capacity: f32,
6237    #[doc = "Predicted battery capacity when fully charged (accounting for battery degradation). NAN: field not provided."]
6238    pub full_charge_capacity: f32,
6239    #[doc = "Lifetime count of the number of charge/discharge cycles (<https://en.wikipedia.org/wiki/Charge_cycle>). UINT16_MAX: field not provided."]
6240    pub cycle_count: u16,
6241    #[doc = "Battery weight. 0: field not provided."]
6242    pub weight: u16,
6243    #[doc = "Battery ID"]
6244    pub id: u8,
6245    #[doc = "Function of the battery."]
6246    pub battery_function: MavBatteryFunction,
6247    #[doc = "Type (chemistry) of the battery."]
6248    pub mavtype: MavBatteryType,
6249    #[doc = "State of Health (SOH) estimate. Typically 100% at the time of manufacture and will decrease over time and use. -1: field not provided."]
6250    pub state_of_health: u8,
6251    #[doc = "Number of battery cells in series. 0: field not provided."]
6252    pub cells_in_series: u8,
6253    #[doc = "Manufacture date (DDMMYYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
6254    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6255    pub manufacture_date: [u8; 9],
6256    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
6257    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6258    pub serial_number: [u8; 32],
6259    #[doc = "Battery device name. Formatted as manufacturer name then product name, separated with an underscore (in ASCII characters), 0 terminated. All 0: field not provided."]
6260    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6261    pub name: [u8; 50],
6262}
6263impl BATTERY_INFO_DATA {
6264    pub const ENCODED_LEN: usize = 140usize;
6265    pub const DEFAULT: Self = Self {
6266        discharge_minimum_voltage: 0.0_f32,
6267        charging_minimum_voltage: 0.0_f32,
6268        resting_minimum_voltage: 0.0_f32,
6269        charging_maximum_voltage: 0.0_f32,
6270        charging_maximum_current: 0.0_f32,
6271        nominal_voltage: 0.0_f32,
6272        discharge_maximum_current: 0.0_f32,
6273        discharge_maximum_burst_current: 0.0_f32,
6274        design_capacity: 0.0_f32,
6275        full_charge_capacity: 0.0_f32,
6276        cycle_count: 0_u16,
6277        weight: 0_u16,
6278        id: 0_u8,
6279        battery_function: MavBatteryFunction::DEFAULT,
6280        mavtype: MavBatteryType::DEFAULT,
6281        state_of_health: 0_u8,
6282        cells_in_series: 0_u8,
6283        manufacture_date: [0_u8; 9usize],
6284        serial_number: [0_u8; 32usize],
6285        name: [0_u8; 50usize],
6286    };
6287    #[cfg(feature = "arbitrary")]
6288    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6289        use arbitrary::{Arbitrary, Unstructured};
6290        let mut buf = [0u8; 1024];
6291        rng.fill_bytes(&mut buf);
6292        let mut unstructured = Unstructured::new(&buf);
6293        Self::arbitrary(&mut unstructured).unwrap_or_default()
6294    }
6295}
6296impl Default for BATTERY_INFO_DATA {
6297    fn default() -> Self {
6298        Self::DEFAULT.clone()
6299    }
6300}
6301impl MessageData for BATTERY_INFO_DATA {
6302    type Message = MavMessage;
6303    const ID: u32 = 372u32;
6304    const NAME: &'static str = "BATTERY_INFO";
6305    const EXTRA_CRC: u8 = 26u8;
6306    const ENCODED_LEN: usize = 140usize;
6307    fn deser(
6308        _version: MavlinkVersion,
6309        __input: &[u8],
6310    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6311        let avail_len = __input.len();
6312        let mut payload_buf = [0; Self::ENCODED_LEN];
6313        let mut buf = if avail_len < Self::ENCODED_LEN {
6314            payload_buf[0..avail_len].copy_from_slice(__input);
6315            Bytes::new(&payload_buf)
6316        } else {
6317            Bytes::new(__input)
6318        };
6319        let mut __struct = Self::default();
6320        __struct.discharge_minimum_voltage = buf.get_f32_le();
6321        __struct.charging_minimum_voltage = buf.get_f32_le();
6322        __struct.resting_minimum_voltage = buf.get_f32_le();
6323        __struct.charging_maximum_voltage = buf.get_f32_le();
6324        __struct.charging_maximum_current = buf.get_f32_le();
6325        __struct.nominal_voltage = buf.get_f32_le();
6326        __struct.discharge_maximum_current = buf.get_f32_le();
6327        __struct.discharge_maximum_burst_current = buf.get_f32_le();
6328        __struct.design_capacity = buf.get_f32_le();
6329        __struct.full_charge_capacity = buf.get_f32_le();
6330        __struct.cycle_count = buf.get_u16_le();
6331        __struct.weight = buf.get_u16_le();
6332        __struct.id = buf.get_u8();
6333        let tmp = buf.get_u8();
6334        __struct.battery_function =
6335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6336                enum_type: "MavBatteryFunction",
6337                value: tmp as u32,
6338            })?;
6339        let tmp = buf.get_u8();
6340        __struct.mavtype =
6341            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6342                enum_type: "MavBatteryType",
6343                value: tmp as u32,
6344            })?;
6345        __struct.state_of_health = buf.get_u8();
6346        __struct.cells_in_series = buf.get_u8();
6347        for v in &mut __struct.manufacture_date {
6348            let val = buf.get_u8();
6349            *v = val;
6350        }
6351        for v in &mut __struct.serial_number {
6352            let val = buf.get_u8();
6353            *v = val;
6354        }
6355        for v in &mut __struct.name {
6356            let val = buf.get_u8();
6357            *v = val;
6358        }
6359        Ok(__struct)
6360    }
6361    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6362        let mut __tmp = BytesMut::new(bytes);
6363        #[allow(clippy::absurd_extreme_comparisons)]
6364        #[allow(unused_comparisons)]
6365        if __tmp.remaining() < Self::ENCODED_LEN {
6366            panic!(
6367                "buffer is too small (need {} bytes, but got {})",
6368                Self::ENCODED_LEN,
6369                __tmp.remaining(),
6370            )
6371        }
6372        __tmp.put_f32_le(self.discharge_minimum_voltage);
6373        __tmp.put_f32_le(self.charging_minimum_voltage);
6374        __tmp.put_f32_le(self.resting_minimum_voltage);
6375        __tmp.put_f32_le(self.charging_maximum_voltage);
6376        __tmp.put_f32_le(self.charging_maximum_current);
6377        __tmp.put_f32_le(self.nominal_voltage);
6378        __tmp.put_f32_le(self.discharge_maximum_current);
6379        __tmp.put_f32_le(self.discharge_maximum_burst_current);
6380        __tmp.put_f32_le(self.design_capacity);
6381        __tmp.put_f32_le(self.full_charge_capacity);
6382        __tmp.put_u16_le(self.cycle_count);
6383        __tmp.put_u16_le(self.weight);
6384        __tmp.put_u8(self.id);
6385        __tmp.put_u8(self.battery_function as u8);
6386        __tmp.put_u8(self.mavtype as u8);
6387        __tmp.put_u8(self.state_of_health);
6388        __tmp.put_u8(self.cells_in_series);
6389        for val in &self.manufacture_date {
6390            __tmp.put_u8(*val);
6391        }
6392        for val in &self.serial_number {
6393            __tmp.put_u8(*val);
6394        }
6395        for val in &self.name {
6396            __tmp.put_u8(*val);
6397        }
6398        if matches!(version, MavlinkVersion::V2) {
6399            let len = __tmp.len();
6400            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6401        } else {
6402            __tmp.len()
6403        }
6404    }
6405}
6406#[doc = "id: 147"]
6407#[doc = "Battery information. Updates GCS with flight controller battery status. Smart batteries also use this message, but may additionally send BATTERY_INFO."]
6408#[derive(Debug, Clone, PartialEq)]
6409#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6410#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6411pub struct BATTERY_STATUS_DATA {
6412    #[doc = "Consumed charge, -1: autopilot does not provide consumption estimate"]
6413    pub current_consumed: i32,
6414    #[doc = "Consumed energy, -1: autopilot does not provide energy consumption estimate"]
6415    pub energy_consumed: i32,
6416    #[doc = "Temperature of the battery. INT16_MAX for unknown temperature."]
6417    pub temperature: i16,
6418    #[doc = "Battery voltage of cells 1 to 10 (see voltages_ext for cells 11-14). Cells in this field above the valid cell count for this battery should have the UINT16_MAX value. If individual cell voltages are unknown or not measured for this battery, then the overall battery voltage should be filled in cell 0, with all others set to UINT16_MAX. If the voltage of the battery is greater than (UINT16_MAX - 1), then cell 0 should be set to (UINT16_MAX - 1), and cell 1 to the remaining voltage. This can be extended to multiple cells if the total voltage is greater than 2 * (UINT16_MAX - 1)."]
6419    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6420    pub voltages: [u16; 10],
6421    #[doc = "Battery current, -1: autopilot does not measure the current"]
6422    pub current_battery: i16,
6423    #[doc = "Battery ID"]
6424    pub id: u8,
6425    #[doc = "Function of the battery"]
6426    pub battery_function: MavBatteryFunction,
6427    #[doc = "Type (chemistry) of the battery"]
6428    pub mavtype: MavBatteryType,
6429    #[doc = "Remaining battery energy. Values: [0-100], -1: autopilot does not estimate the remaining battery."]
6430    pub battery_remaining: i8,
6431    #[doc = "Remaining battery time, 0: autopilot does not provide remaining battery time estimate"]
6432    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6433    pub time_remaining: i32,
6434    #[doc = "State for extent of discharge, provided by autopilot for warning or external reactions"]
6435    #[cfg_attr(feature = "serde", serde(default))]
6436    pub charge_state: MavBatteryChargeState,
6437    #[doc = "Battery voltages for cells 11 to 14. Cells above the valid cell count for this battery should have a value of 0, where zero indicates not supported (note, this is different than for the voltages field and allows empty byte truncation). If the measured value is 0 then 1 should be sent instead."]
6438    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6439    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6440    pub voltages_ext: [u16; 4],
6441    #[doc = "Battery mode. Default (0) is that battery mode reporting is not supported or battery is in normal-use mode."]
6442    #[cfg_attr(feature = "serde", serde(default))]
6443    pub mode: MavBatteryMode,
6444    #[doc = "Fault/health indications. These should be set when charge_state is MAV_BATTERY_CHARGE_STATE_FAILED or MAV_BATTERY_CHARGE_STATE_UNHEALTHY (if not, fault reporting is not supported)."]
6445    #[cfg_attr(feature = "serde", serde(default))]
6446    pub fault_bitmask: MavBatteryFault,
6447}
6448impl BATTERY_STATUS_DATA {
6449    pub const ENCODED_LEN: usize = 54usize;
6450    pub const DEFAULT: Self = Self {
6451        current_consumed: 0_i32,
6452        energy_consumed: 0_i32,
6453        temperature: 0_i16,
6454        voltages: [0_u16; 10usize],
6455        current_battery: 0_i16,
6456        id: 0_u8,
6457        battery_function: MavBatteryFunction::DEFAULT,
6458        mavtype: MavBatteryType::DEFAULT,
6459        battery_remaining: 0_i8,
6460        time_remaining: 0_i32,
6461        charge_state: MavBatteryChargeState::DEFAULT,
6462        voltages_ext: [0_u16; 4usize],
6463        mode: MavBatteryMode::DEFAULT,
6464        fault_bitmask: MavBatteryFault::DEFAULT,
6465    };
6466    #[cfg(feature = "arbitrary")]
6467    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6468        use arbitrary::{Arbitrary, Unstructured};
6469        let mut buf = [0u8; 1024];
6470        rng.fill_bytes(&mut buf);
6471        let mut unstructured = Unstructured::new(&buf);
6472        Self::arbitrary(&mut unstructured).unwrap_or_default()
6473    }
6474}
6475impl Default for BATTERY_STATUS_DATA {
6476    fn default() -> Self {
6477        Self::DEFAULT.clone()
6478    }
6479}
6480impl MessageData for BATTERY_STATUS_DATA {
6481    type Message = MavMessage;
6482    const ID: u32 = 147u32;
6483    const NAME: &'static str = "BATTERY_STATUS";
6484    const EXTRA_CRC: u8 = 154u8;
6485    const ENCODED_LEN: usize = 54usize;
6486    fn deser(
6487        _version: MavlinkVersion,
6488        __input: &[u8],
6489    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6490        let avail_len = __input.len();
6491        let mut payload_buf = [0; Self::ENCODED_LEN];
6492        let mut buf = if avail_len < Self::ENCODED_LEN {
6493            payload_buf[0..avail_len].copy_from_slice(__input);
6494            Bytes::new(&payload_buf)
6495        } else {
6496            Bytes::new(__input)
6497        };
6498        let mut __struct = Self::default();
6499        __struct.current_consumed = buf.get_i32_le();
6500        __struct.energy_consumed = buf.get_i32_le();
6501        __struct.temperature = buf.get_i16_le();
6502        for v in &mut __struct.voltages {
6503            let val = buf.get_u16_le();
6504            *v = val;
6505        }
6506        __struct.current_battery = buf.get_i16_le();
6507        __struct.id = buf.get_u8();
6508        let tmp = buf.get_u8();
6509        __struct.battery_function =
6510            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6511                enum_type: "MavBatteryFunction",
6512                value: tmp as u32,
6513            })?;
6514        let tmp = buf.get_u8();
6515        __struct.mavtype =
6516            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6517                enum_type: "MavBatteryType",
6518                value: tmp as u32,
6519            })?;
6520        __struct.battery_remaining = buf.get_i8();
6521        __struct.time_remaining = buf.get_i32_le();
6522        let tmp = buf.get_u8();
6523        __struct.charge_state =
6524            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6525                enum_type: "MavBatteryChargeState",
6526                value: tmp as u32,
6527            })?;
6528        for v in &mut __struct.voltages_ext {
6529            let val = buf.get_u16_le();
6530            *v = val;
6531        }
6532        let tmp = buf.get_u8();
6533        __struct.mode =
6534            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
6535                enum_type: "MavBatteryMode",
6536                value: tmp as u32,
6537            })?;
6538        let tmp = buf.get_u32_le();
6539        __struct.fault_bitmask = MavBatteryFault::from_bits(tmp & MavBatteryFault::all().bits())
6540            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
6541                flag_type: "MavBatteryFault",
6542                value: tmp as u32,
6543            })?;
6544        Ok(__struct)
6545    }
6546    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6547        let mut __tmp = BytesMut::new(bytes);
6548        #[allow(clippy::absurd_extreme_comparisons)]
6549        #[allow(unused_comparisons)]
6550        if __tmp.remaining() < Self::ENCODED_LEN {
6551            panic!(
6552                "buffer is too small (need {} bytes, but got {})",
6553                Self::ENCODED_LEN,
6554                __tmp.remaining(),
6555            )
6556        }
6557        __tmp.put_i32_le(self.current_consumed);
6558        __tmp.put_i32_le(self.energy_consumed);
6559        __tmp.put_i16_le(self.temperature);
6560        for val in &self.voltages {
6561            __tmp.put_u16_le(*val);
6562        }
6563        __tmp.put_i16_le(self.current_battery);
6564        __tmp.put_u8(self.id);
6565        __tmp.put_u8(self.battery_function as u8);
6566        __tmp.put_u8(self.mavtype as u8);
6567        __tmp.put_i8(self.battery_remaining);
6568        __tmp.put_i32_le(self.time_remaining);
6569        __tmp.put_u8(self.charge_state as u8);
6570        for val in &self.voltages_ext {
6571            __tmp.put_u16_le(*val);
6572        }
6573        __tmp.put_u8(self.mode as u8);
6574        __tmp.put_u32_le(self.fault_bitmask.bits());
6575        if matches!(version, MavlinkVersion::V2) {
6576            let len = __tmp.len();
6577            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6578        } else {
6579            __tmp.len()
6580        }
6581    }
6582}
6583#[doc = "id: 257"]
6584#[doc = "Report button state change."]
6585#[derive(Debug, Clone, PartialEq)]
6586#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6587#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6588pub struct BUTTON_CHANGE_DATA {
6589    #[doc = "Timestamp (time since system boot)."]
6590    pub time_boot_ms: u32,
6591    #[doc = "Time of last change of button state."]
6592    pub last_change_ms: u32,
6593    #[doc = "Bitmap for state of buttons."]
6594    pub state: u8,
6595}
6596impl BUTTON_CHANGE_DATA {
6597    pub const ENCODED_LEN: usize = 9usize;
6598    pub const DEFAULT: Self = Self {
6599        time_boot_ms: 0_u32,
6600        last_change_ms: 0_u32,
6601        state: 0_u8,
6602    };
6603    #[cfg(feature = "arbitrary")]
6604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6605        use arbitrary::{Arbitrary, Unstructured};
6606        let mut buf = [0u8; 1024];
6607        rng.fill_bytes(&mut buf);
6608        let mut unstructured = Unstructured::new(&buf);
6609        Self::arbitrary(&mut unstructured).unwrap_or_default()
6610    }
6611}
6612impl Default for BUTTON_CHANGE_DATA {
6613    fn default() -> Self {
6614        Self::DEFAULT.clone()
6615    }
6616}
6617impl MessageData for BUTTON_CHANGE_DATA {
6618    type Message = MavMessage;
6619    const ID: u32 = 257u32;
6620    const NAME: &'static str = "BUTTON_CHANGE";
6621    const EXTRA_CRC: u8 = 131u8;
6622    const ENCODED_LEN: usize = 9usize;
6623    fn deser(
6624        _version: MavlinkVersion,
6625        __input: &[u8],
6626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6627        let avail_len = __input.len();
6628        let mut payload_buf = [0; Self::ENCODED_LEN];
6629        let mut buf = if avail_len < Self::ENCODED_LEN {
6630            payload_buf[0..avail_len].copy_from_slice(__input);
6631            Bytes::new(&payload_buf)
6632        } else {
6633            Bytes::new(__input)
6634        };
6635        let mut __struct = Self::default();
6636        __struct.time_boot_ms = buf.get_u32_le();
6637        __struct.last_change_ms = buf.get_u32_le();
6638        __struct.state = buf.get_u8();
6639        Ok(__struct)
6640    }
6641    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6642        let mut __tmp = BytesMut::new(bytes);
6643        #[allow(clippy::absurd_extreme_comparisons)]
6644        #[allow(unused_comparisons)]
6645        if __tmp.remaining() < Self::ENCODED_LEN {
6646            panic!(
6647                "buffer is too small (need {} bytes, but got {})",
6648                Self::ENCODED_LEN,
6649                __tmp.remaining(),
6650            )
6651        }
6652        __tmp.put_u32_le(self.time_boot_ms);
6653        __tmp.put_u32_le(self.last_change_ms);
6654        __tmp.put_u8(self.state);
6655        if matches!(version, MavlinkVersion::V2) {
6656            let len = __tmp.len();
6657            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6658        } else {
6659            __tmp.len()
6660        }
6661    }
6662}
6663#[doc = "id: 262"]
6664#[doc = "Information about the status of a capture. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6665#[derive(Debug, Clone, PartialEq)]
6666#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6667#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6668pub struct CAMERA_CAPTURE_STATUS_DATA {
6669    #[doc = "Timestamp (time since system boot)."]
6670    pub time_boot_ms: u32,
6671    #[doc = "Image capture interval"]
6672    pub image_interval: f32,
6673    #[doc = "Elapsed time since recording started (0: Not supported/available). A GCS should compute recording time and use non-zero values of this field to correct any discrepancy."]
6674    pub recording_time_ms: u32,
6675    #[doc = "Available storage capacity."]
6676    pub available_capacity: f32,
6677    #[doc = "Current status of image capturing (0: idle, 1: capture in progress, 2: interval set but idle, 3: interval set and capture in progress)"]
6678    pub image_status: u8,
6679    #[doc = "Current status of video capturing (0: idle, 1: capture in progress)"]
6680    pub video_status: u8,
6681    #[doc = "Total number of images captured ('forever', or until reset using MAV_CMD_STORAGE_FORMAT)."]
6682    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6683    pub image_count: i32,
6684    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6685    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6686    pub camera_device_id: u8,
6687}
6688impl CAMERA_CAPTURE_STATUS_DATA {
6689    pub const ENCODED_LEN: usize = 23usize;
6690    pub const DEFAULT: Self = Self {
6691        time_boot_ms: 0_u32,
6692        image_interval: 0.0_f32,
6693        recording_time_ms: 0_u32,
6694        available_capacity: 0.0_f32,
6695        image_status: 0_u8,
6696        video_status: 0_u8,
6697        image_count: 0_i32,
6698        camera_device_id: 0_u8,
6699    };
6700    #[cfg(feature = "arbitrary")]
6701    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6702        use arbitrary::{Arbitrary, Unstructured};
6703        let mut buf = [0u8; 1024];
6704        rng.fill_bytes(&mut buf);
6705        let mut unstructured = Unstructured::new(&buf);
6706        Self::arbitrary(&mut unstructured).unwrap_or_default()
6707    }
6708}
6709impl Default for CAMERA_CAPTURE_STATUS_DATA {
6710    fn default() -> Self {
6711        Self::DEFAULT.clone()
6712    }
6713}
6714impl MessageData for CAMERA_CAPTURE_STATUS_DATA {
6715    type Message = MavMessage;
6716    const ID: u32 = 262u32;
6717    const NAME: &'static str = "CAMERA_CAPTURE_STATUS";
6718    const EXTRA_CRC: u8 = 12u8;
6719    const ENCODED_LEN: usize = 23usize;
6720    fn deser(
6721        _version: MavlinkVersion,
6722        __input: &[u8],
6723    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6724        let avail_len = __input.len();
6725        let mut payload_buf = [0; Self::ENCODED_LEN];
6726        let mut buf = if avail_len < Self::ENCODED_LEN {
6727            payload_buf[0..avail_len].copy_from_slice(__input);
6728            Bytes::new(&payload_buf)
6729        } else {
6730            Bytes::new(__input)
6731        };
6732        let mut __struct = Self::default();
6733        __struct.time_boot_ms = buf.get_u32_le();
6734        __struct.image_interval = buf.get_f32_le();
6735        __struct.recording_time_ms = buf.get_u32_le();
6736        __struct.available_capacity = buf.get_f32_le();
6737        __struct.image_status = buf.get_u8();
6738        __struct.video_status = buf.get_u8();
6739        __struct.image_count = buf.get_i32_le();
6740        __struct.camera_device_id = buf.get_u8();
6741        Ok(__struct)
6742    }
6743    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6744        let mut __tmp = BytesMut::new(bytes);
6745        #[allow(clippy::absurd_extreme_comparisons)]
6746        #[allow(unused_comparisons)]
6747        if __tmp.remaining() < Self::ENCODED_LEN {
6748            panic!(
6749                "buffer is too small (need {} bytes, but got {})",
6750                Self::ENCODED_LEN,
6751                __tmp.remaining(),
6752            )
6753        }
6754        __tmp.put_u32_le(self.time_boot_ms);
6755        __tmp.put_f32_le(self.image_interval);
6756        __tmp.put_u32_le(self.recording_time_ms);
6757        __tmp.put_f32_le(self.available_capacity);
6758        __tmp.put_u8(self.image_status);
6759        __tmp.put_u8(self.video_status);
6760        __tmp.put_i32_le(self.image_count);
6761        __tmp.put_u8(self.camera_device_id);
6762        if matches!(version, MavlinkVersion::V2) {
6763            let len = __tmp.len();
6764            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6765        } else {
6766            __tmp.len()
6767        }
6768    }
6769}
6770#[doc = "id: 271"]
6771#[doc = "Information about the field of view of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
6772#[derive(Debug, Clone, PartialEq)]
6773#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6774#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6775pub struct CAMERA_FOV_STATUS_DATA {
6776    #[doc = "Timestamp (time since system boot)."]
6777    pub time_boot_ms: u32,
6778    #[doc = "Latitude of camera (INT32_MAX if unknown)."]
6779    pub lat_camera: i32,
6780    #[doc = "Longitude of camera (INT32_MAX if unknown)."]
6781    pub lon_camera: i32,
6782    #[doc = "Altitude (MSL) of camera (INT32_MAX if unknown)."]
6783    pub alt_camera: i32,
6784    #[doc = "Latitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6785    pub lat_image: i32,
6786    #[doc = "Longitude of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6787    pub lon_image: i32,
6788    #[doc = "Altitude (MSL) of center of image (INT32_MAX if unknown, INT32_MIN if at infinity, not intersecting with horizon)."]
6789    pub alt_image: i32,
6790    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6791    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6792    pub q: [f32; 4],
6793    #[doc = "Horizontal field of view (NaN if unknown)."]
6794    pub hfov: f32,
6795    #[doc = "Vertical field of view (NaN if unknown)."]
6796    pub vfov: f32,
6797    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
6798    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
6799    pub camera_device_id: u8,
6800}
6801impl CAMERA_FOV_STATUS_DATA {
6802    pub const ENCODED_LEN: usize = 53usize;
6803    pub const DEFAULT: Self = Self {
6804        time_boot_ms: 0_u32,
6805        lat_camera: 0_i32,
6806        lon_camera: 0_i32,
6807        alt_camera: 0_i32,
6808        lat_image: 0_i32,
6809        lon_image: 0_i32,
6810        alt_image: 0_i32,
6811        q: [0.0_f32; 4usize],
6812        hfov: 0.0_f32,
6813        vfov: 0.0_f32,
6814        camera_device_id: 0_u8,
6815    };
6816    #[cfg(feature = "arbitrary")]
6817    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6818        use arbitrary::{Arbitrary, Unstructured};
6819        let mut buf = [0u8; 1024];
6820        rng.fill_bytes(&mut buf);
6821        let mut unstructured = Unstructured::new(&buf);
6822        Self::arbitrary(&mut unstructured).unwrap_or_default()
6823    }
6824}
6825impl Default for CAMERA_FOV_STATUS_DATA {
6826    fn default() -> Self {
6827        Self::DEFAULT.clone()
6828    }
6829}
6830impl MessageData for CAMERA_FOV_STATUS_DATA {
6831    type Message = MavMessage;
6832    const ID: u32 = 271u32;
6833    const NAME: &'static str = "CAMERA_FOV_STATUS";
6834    const EXTRA_CRC: u8 = 22u8;
6835    const ENCODED_LEN: usize = 53usize;
6836    fn deser(
6837        _version: MavlinkVersion,
6838        __input: &[u8],
6839    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6840        let avail_len = __input.len();
6841        let mut payload_buf = [0; Self::ENCODED_LEN];
6842        let mut buf = if avail_len < Self::ENCODED_LEN {
6843            payload_buf[0..avail_len].copy_from_slice(__input);
6844            Bytes::new(&payload_buf)
6845        } else {
6846            Bytes::new(__input)
6847        };
6848        let mut __struct = Self::default();
6849        __struct.time_boot_ms = buf.get_u32_le();
6850        __struct.lat_camera = buf.get_i32_le();
6851        __struct.lon_camera = buf.get_i32_le();
6852        __struct.alt_camera = buf.get_i32_le();
6853        __struct.lat_image = buf.get_i32_le();
6854        __struct.lon_image = buf.get_i32_le();
6855        __struct.alt_image = buf.get_i32_le();
6856        for v in &mut __struct.q {
6857            let val = buf.get_f32_le();
6858            *v = val;
6859        }
6860        __struct.hfov = buf.get_f32_le();
6861        __struct.vfov = buf.get_f32_le();
6862        __struct.camera_device_id = buf.get_u8();
6863        Ok(__struct)
6864    }
6865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6866        let mut __tmp = BytesMut::new(bytes);
6867        #[allow(clippy::absurd_extreme_comparisons)]
6868        #[allow(unused_comparisons)]
6869        if __tmp.remaining() < Self::ENCODED_LEN {
6870            panic!(
6871                "buffer is too small (need {} bytes, but got {})",
6872                Self::ENCODED_LEN,
6873                __tmp.remaining(),
6874            )
6875        }
6876        __tmp.put_u32_le(self.time_boot_ms);
6877        __tmp.put_i32_le(self.lat_camera);
6878        __tmp.put_i32_le(self.lon_camera);
6879        __tmp.put_i32_le(self.alt_camera);
6880        __tmp.put_i32_le(self.lat_image);
6881        __tmp.put_i32_le(self.lon_image);
6882        __tmp.put_i32_le(self.alt_image);
6883        for val in &self.q {
6884            __tmp.put_f32_le(*val);
6885        }
6886        __tmp.put_f32_le(self.hfov);
6887        __tmp.put_f32_le(self.vfov);
6888        __tmp.put_u8(self.camera_device_id);
6889        if matches!(version, MavlinkVersion::V2) {
6890            let len = __tmp.len();
6891            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
6892        } else {
6893            __tmp.len()
6894        }
6895    }
6896}
6897#[doc = "id: 263"]
6898#[doc = "Information about a captured image. This is emitted every time a message is captured.         MAV_CMD_REQUEST_MESSAGE can be used to (re)request this message for a specific sequence number or range of sequence numbers:         MAV_CMD_REQUEST_MESSAGE.param2 indicates the sequence number the first image to send, or set to -1 to send the message for all sequence numbers.         MAV_CMD_REQUEST_MESSAGE.param3 is used to specify a range of messages to send:         set to 0 (default) to send just the the message for the sequence number in param 2,         set to -1 to send the message for the sequence number in param 2 and all the following sequence numbers,         set to the sequence number of the final message in the range."]
6899#[derive(Debug, Clone, PartialEq)]
6900#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
6901#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
6902pub struct CAMERA_IMAGE_CAPTURED_DATA {
6903    #[doc = "Timestamp (time since UNIX epoch) in UTC. 0 for unknown."]
6904    pub time_utc: u64,
6905    #[doc = "Timestamp (time since system boot)."]
6906    pub time_boot_ms: u32,
6907    #[doc = "Latitude where image was taken"]
6908    pub lat: i32,
6909    #[doc = "Longitude where capture was taken"]
6910    pub lon: i32,
6911    #[doc = "Altitude (MSL) where image was taken"]
6912    pub alt: i32,
6913    #[doc = "Altitude above ground"]
6914    pub relative_alt: i32,
6915    #[doc = "Quaternion of camera orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
6916    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6917    pub q: [f32; 4],
6918    #[doc = "Zero based index of this image (i.e. a new image will have index CAMERA_CAPTURE_STATUS.image count -1)"]
6919    pub image_index: i32,
6920    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id). Field name is usually camera_device_id."]
6921    pub camera_id: u8,
6922    #[doc = "Boolean indicating success (1) or failure (0) while capturing this image."]
6923    pub capture_result: i8,
6924    #[doc = "URL of image taken. Either local storage or <http://foo.jpg> if camera provides an HTTP interface."]
6925    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
6926    pub file_url: [u8; 205],
6927}
6928impl CAMERA_IMAGE_CAPTURED_DATA {
6929    pub const ENCODED_LEN: usize = 255usize;
6930    pub const DEFAULT: Self = Self {
6931        time_utc: 0_u64,
6932        time_boot_ms: 0_u32,
6933        lat: 0_i32,
6934        lon: 0_i32,
6935        alt: 0_i32,
6936        relative_alt: 0_i32,
6937        q: [0.0_f32; 4usize],
6938        image_index: 0_i32,
6939        camera_id: 0_u8,
6940        capture_result: 0_i8,
6941        file_url: [0_u8; 205usize],
6942    };
6943    #[cfg(feature = "arbitrary")]
6944    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
6945        use arbitrary::{Arbitrary, Unstructured};
6946        let mut buf = [0u8; 1024];
6947        rng.fill_bytes(&mut buf);
6948        let mut unstructured = Unstructured::new(&buf);
6949        Self::arbitrary(&mut unstructured).unwrap_or_default()
6950    }
6951}
6952impl Default for CAMERA_IMAGE_CAPTURED_DATA {
6953    fn default() -> Self {
6954        Self::DEFAULT.clone()
6955    }
6956}
6957impl MessageData for CAMERA_IMAGE_CAPTURED_DATA {
6958    type Message = MavMessage;
6959    const ID: u32 = 263u32;
6960    const NAME: &'static str = "CAMERA_IMAGE_CAPTURED";
6961    const EXTRA_CRC: u8 = 133u8;
6962    const ENCODED_LEN: usize = 255usize;
6963    fn deser(
6964        _version: MavlinkVersion,
6965        __input: &[u8],
6966    ) -> Result<Self, ::mavlink_core::error::ParserError> {
6967        let avail_len = __input.len();
6968        let mut payload_buf = [0; Self::ENCODED_LEN];
6969        let mut buf = if avail_len < Self::ENCODED_LEN {
6970            payload_buf[0..avail_len].copy_from_slice(__input);
6971            Bytes::new(&payload_buf)
6972        } else {
6973            Bytes::new(__input)
6974        };
6975        let mut __struct = Self::default();
6976        __struct.time_utc = buf.get_u64_le();
6977        __struct.time_boot_ms = buf.get_u32_le();
6978        __struct.lat = buf.get_i32_le();
6979        __struct.lon = buf.get_i32_le();
6980        __struct.alt = buf.get_i32_le();
6981        __struct.relative_alt = buf.get_i32_le();
6982        for v in &mut __struct.q {
6983            let val = buf.get_f32_le();
6984            *v = val;
6985        }
6986        __struct.image_index = buf.get_i32_le();
6987        __struct.camera_id = buf.get_u8();
6988        __struct.capture_result = buf.get_i8();
6989        for v in &mut __struct.file_url {
6990            let val = buf.get_u8();
6991            *v = val;
6992        }
6993        Ok(__struct)
6994    }
6995    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
6996        let mut __tmp = BytesMut::new(bytes);
6997        #[allow(clippy::absurd_extreme_comparisons)]
6998        #[allow(unused_comparisons)]
6999        if __tmp.remaining() < Self::ENCODED_LEN {
7000            panic!(
7001                "buffer is too small (need {} bytes, but got {})",
7002                Self::ENCODED_LEN,
7003                __tmp.remaining(),
7004            )
7005        }
7006        __tmp.put_u64_le(self.time_utc);
7007        __tmp.put_u32_le(self.time_boot_ms);
7008        __tmp.put_i32_le(self.lat);
7009        __tmp.put_i32_le(self.lon);
7010        __tmp.put_i32_le(self.alt);
7011        __tmp.put_i32_le(self.relative_alt);
7012        for val in &self.q {
7013            __tmp.put_f32_le(*val);
7014        }
7015        __tmp.put_i32_le(self.image_index);
7016        __tmp.put_u8(self.camera_id);
7017        __tmp.put_i8(self.capture_result);
7018        for val in &self.file_url {
7019            __tmp.put_u8(*val);
7020        }
7021        if matches!(version, MavlinkVersion::V2) {
7022            let len = __tmp.len();
7023            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7024        } else {
7025            __tmp.len()
7026        }
7027    }
7028}
7029#[doc = "id: 259"]
7030#[doc = "Information about a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7031#[derive(Debug, Clone, PartialEq)]
7032#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7033#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7034pub struct CAMERA_INFORMATION_DATA {
7035    #[doc = "Timestamp (time since system boot)."]
7036    pub time_boot_ms: u32,
7037    #[doc = "0xff). Use 0 if not known."]
7038    pub firmware_version: u32,
7039    #[doc = "Focal length. Use NaN if not known."]
7040    pub focal_length: f32,
7041    #[doc = "Image sensor size horizontal. Use NaN if not known."]
7042    pub sensor_size_h: f32,
7043    #[doc = "Image sensor size vertical. Use NaN if not known."]
7044    pub sensor_size_v: f32,
7045    #[doc = "Bitmap of camera capability flags."]
7046    pub flags: CameraCapFlags,
7047    #[doc = "Horizontal image resolution. Use 0 if not known."]
7048    pub resolution_h: u16,
7049    #[doc = "Vertical image resolution. Use 0 if not known."]
7050    pub resolution_v: u16,
7051    #[doc = "Camera definition version (iteration).  Use 0 if not known."]
7052    pub cam_definition_version: u16,
7053    #[doc = "Name of the camera vendor"]
7054    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7055    pub vendor_name: [u8; 32],
7056    #[doc = "Name of the camera model"]
7057    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7058    pub model_name: [u8; 32],
7059    #[doc = "Reserved for a lens ID.  Use 0 if not known."]
7060    pub lens_id: u8,
7061    #[doc = "Camera definition URI (if any, otherwise only basic functions will be available). HTTP- (http://) and MAVLink FTP- (mavlinkftp://) formatted URIs are allowed (and both must be supported by any GCS that implements the Camera Protocol). The definition file may be xz compressed, which will be indicated by the file extension .xml.xz (a GCS that implements the protocol must support decompressing the file). The string needs to be zero terminated.  Use a zero-length string if not known."]
7062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7063    pub cam_definition_uri: [u8; 140],
7064    #[doc = "Gimbal id of a gimbal associated with this camera. This is the component id of the gimbal device, or 1-6 for non mavlink gimbals. Use 0 if no gimbal is associated with the camera."]
7065    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7066    pub gimbal_device_id: u8,
7067    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7068    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7069    pub camera_device_id: u8,
7070}
7071impl CAMERA_INFORMATION_DATA {
7072    pub const ENCODED_LEN: usize = 237usize;
7073    pub const DEFAULT: Self = Self {
7074        time_boot_ms: 0_u32,
7075        firmware_version: 0_u32,
7076        focal_length: 0.0_f32,
7077        sensor_size_h: 0.0_f32,
7078        sensor_size_v: 0.0_f32,
7079        flags: CameraCapFlags::DEFAULT,
7080        resolution_h: 0_u16,
7081        resolution_v: 0_u16,
7082        cam_definition_version: 0_u16,
7083        vendor_name: [0_u8; 32usize],
7084        model_name: [0_u8; 32usize],
7085        lens_id: 0_u8,
7086        cam_definition_uri: [0_u8; 140usize],
7087        gimbal_device_id: 0_u8,
7088        camera_device_id: 0_u8,
7089    };
7090    #[cfg(feature = "arbitrary")]
7091    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7092        use arbitrary::{Arbitrary, Unstructured};
7093        let mut buf = [0u8; 1024];
7094        rng.fill_bytes(&mut buf);
7095        let mut unstructured = Unstructured::new(&buf);
7096        Self::arbitrary(&mut unstructured).unwrap_or_default()
7097    }
7098}
7099impl Default for CAMERA_INFORMATION_DATA {
7100    fn default() -> Self {
7101        Self::DEFAULT.clone()
7102    }
7103}
7104impl MessageData for CAMERA_INFORMATION_DATA {
7105    type Message = MavMessage;
7106    const ID: u32 = 259u32;
7107    const NAME: &'static str = "CAMERA_INFORMATION";
7108    const EXTRA_CRC: u8 = 92u8;
7109    const ENCODED_LEN: usize = 237usize;
7110    fn deser(
7111        _version: MavlinkVersion,
7112        __input: &[u8],
7113    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7114        let avail_len = __input.len();
7115        let mut payload_buf = [0; Self::ENCODED_LEN];
7116        let mut buf = if avail_len < Self::ENCODED_LEN {
7117            payload_buf[0..avail_len].copy_from_slice(__input);
7118            Bytes::new(&payload_buf)
7119        } else {
7120            Bytes::new(__input)
7121        };
7122        let mut __struct = Self::default();
7123        __struct.time_boot_ms = buf.get_u32_le();
7124        __struct.firmware_version = buf.get_u32_le();
7125        __struct.focal_length = buf.get_f32_le();
7126        __struct.sensor_size_h = buf.get_f32_le();
7127        __struct.sensor_size_v = buf.get_f32_le();
7128        let tmp = buf.get_u32_le();
7129        __struct.flags = CameraCapFlags::from_bits(tmp & CameraCapFlags::all().bits()).ok_or(
7130            ::mavlink_core::error::ParserError::InvalidFlag {
7131                flag_type: "CameraCapFlags",
7132                value: tmp as u32,
7133            },
7134        )?;
7135        __struct.resolution_h = buf.get_u16_le();
7136        __struct.resolution_v = buf.get_u16_le();
7137        __struct.cam_definition_version = buf.get_u16_le();
7138        for v in &mut __struct.vendor_name {
7139            let val = buf.get_u8();
7140            *v = val;
7141        }
7142        for v in &mut __struct.model_name {
7143            let val = buf.get_u8();
7144            *v = val;
7145        }
7146        __struct.lens_id = buf.get_u8();
7147        for v in &mut __struct.cam_definition_uri {
7148            let val = buf.get_u8();
7149            *v = val;
7150        }
7151        __struct.gimbal_device_id = buf.get_u8();
7152        __struct.camera_device_id = buf.get_u8();
7153        Ok(__struct)
7154    }
7155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7156        let mut __tmp = BytesMut::new(bytes);
7157        #[allow(clippy::absurd_extreme_comparisons)]
7158        #[allow(unused_comparisons)]
7159        if __tmp.remaining() < Self::ENCODED_LEN {
7160            panic!(
7161                "buffer is too small (need {} bytes, but got {})",
7162                Self::ENCODED_LEN,
7163                __tmp.remaining(),
7164            )
7165        }
7166        __tmp.put_u32_le(self.time_boot_ms);
7167        __tmp.put_u32_le(self.firmware_version);
7168        __tmp.put_f32_le(self.focal_length);
7169        __tmp.put_f32_le(self.sensor_size_h);
7170        __tmp.put_f32_le(self.sensor_size_v);
7171        __tmp.put_u32_le(self.flags.bits());
7172        __tmp.put_u16_le(self.resolution_h);
7173        __tmp.put_u16_le(self.resolution_v);
7174        __tmp.put_u16_le(self.cam_definition_version);
7175        for val in &self.vendor_name {
7176            __tmp.put_u8(*val);
7177        }
7178        for val in &self.model_name {
7179            __tmp.put_u8(*val);
7180        }
7181        __tmp.put_u8(self.lens_id);
7182        for val in &self.cam_definition_uri {
7183            __tmp.put_u8(*val);
7184        }
7185        __tmp.put_u8(self.gimbal_device_id);
7186        __tmp.put_u8(self.camera_device_id);
7187        if matches!(version, MavlinkVersion::V2) {
7188            let len = __tmp.len();
7189            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7190        } else {
7191            __tmp.len()
7192        }
7193    }
7194}
7195#[doc = "id: 260"]
7196#[doc = "Settings of a camera. Can be requested with a MAV_CMD_REQUEST_MESSAGE command."]
7197#[derive(Debug, Clone, PartialEq)]
7198#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7199#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7200pub struct CAMERA_SETTINGS_DATA {
7201    #[doc = "Timestamp (time since system boot)."]
7202    pub time_boot_ms: u32,
7203    #[doc = "Camera mode"]
7204    pub mode_id: CameraMode,
7205    #[doc = "Current zoom level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7206    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7207    pub zoomLevel: f32,
7208    #[doc = "Current focus level as a percentage of the full range (0.0 to 100.0, NaN if not known)"]
7209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7210    pub focusLevel: f32,
7211    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7212    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7213    pub camera_device_id: u8,
7214}
7215impl CAMERA_SETTINGS_DATA {
7216    pub const ENCODED_LEN: usize = 14usize;
7217    pub const DEFAULT: Self = Self {
7218        time_boot_ms: 0_u32,
7219        mode_id: CameraMode::DEFAULT,
7220        zoomLevel: 0.0_f32,
7221        focusLevel: 0.0_f32,
7222        camera_device_id: 0_u8,
7223    };
7224    #[cfg(feature = "arbitrary")]
7225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7226        use arbitrary::{Arbitrary, Unstructured};
7227        let mut buf = [0u8; 1024];
7228        rng.fill_bytes(&mut buf);
7229        let mut unstructured = Unstructured::new(&buf);
7230        Self::arbitrary(&mut unstructured).unwrap_or_default()
7231    }
7232}
7233impl Default for CAMERA_SETTINGS_DATA {
7234    fn default() -> Self {
7235        Self::DEFAULT.clone()
7236    }
7237}
7238impl MessageData for CAMERA_SETTINGS_DATA {
7239    type Message = MavMessage;
7240    const ID: u32 = 260u32;
7241    const NAME: &'static str = "CAMERA_SETTINGS";
7242    const EXTRA_CRC: u8 = 146u8;
7243    const ENCODED_LEN: usize = 14usize;
7244    fn deser(
7245        _version: MavlinkVersion,
7246        __input: &[u8],
7247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7248        let avail_len = __input.len();
7249        let mut payload_buf = [0; Self::ENCODED_LEN];
7250        let mut buf = if avail_len < Self::ENCODED_LEN {
7251            payload_buf[0..avail_len].copy_from_slice(__input);
7252            Bytes::new(&payload_buf)
7253        } else {
7254            Bytes::new(__input)
7255        };
7256        let mut __struct = Self::default();
7257        __struct.time_boot_ms = buf.get_u32_le();
7258        let tmp = buf.get_u8();
7259        __struct.mode_id =
7260            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7261                enum_type: "CameraMode",
7262                value: tmp as u32,
7263            })?;
7264        __struct.zoomLevel = buf.get_f32_le();
7265        __struct.focusLevel = buf.get_f32_le();
7266        __struct.camera_device_id = buf.get_u8();
7267        Ok(__struct)
7268    }
7269    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7270        let mut __tmp = BytesMut::new(bytes);
7271        #[allow(clippy::absurd_extreme_comparisons)]
7272        #[allow(unused_comparisons)]
7273        if __tmp.remaining() < Self::ENCODED_LEN {
7274            panic!(
7275                "buffer is too small (need {} bytes, but got {})",
7276                Self::ENCODED_LEN,
7277                __tmp.remaining(),
7278            )
7279        }
7280        __tmp.put_u32_le(self.time_boot_ms);
7281        __tmp.put_u8(self.mode_id as u8);
7282        __tmp.put_f32_le(self.zoomLevel);
7283        __tmp.put_f32_le(self.focusLevel);
7284        __tmp.put_u8(self.camera_device_id);
7285        if matches!(version, MavlinkVersion::V2) {
7286            let len = __tmp.len();
7287            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7288        } else {
7289            __tmp.len()
7290        }
7291    }
7292}
7293#[doc = "id: 277"]
7294#[doc = "Camera absolute thermal range. This can be streamed when the associated VIDEO_STREAM_STATUS `flag` field bit VIDEO_STREAM_STATUS_FLAGS_THERMAL_RANGE_ENABLED is set, but a GCS may choose to only request it for the current active stream. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval (param3 indicates the stream id of the current camera, or 0 for all streams, param4 indicates the target camera_device_id for autopilot-attached cameras or 0 for MAVLink cameras)."]
7295#[derive(Debug, Clone, PartialEq)]
7296#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7297#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7298pub struct CAMERA_THERMAL_RANGE_DATA {
7299    #[doc = "Timestamp (time since system boot)."]
7300    pub time_boot_ms: u32,
7301    #[doc = "Temperature max."]
7302    pub max: f32,
7303    #[doc = "Temperature max point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7304    pub max_point_x: f32,
7305    #[doc = "Temperature max point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7306    pub max_point_y: f32,
7307    #[doc = "Temperature min."]
7308    pub min: f32,
7309    #[doc = "Temperature min point x value (normalized 0..1, 0 is left, 1 is right), NAN if unknown."]
7310    pub min_point_x: f32,
7311    #[doc = "Temperature min point y value (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown."]
7312    pub min_point_y: f32,
7313    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
7314    pub stream_id: u8,
7315    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7316    pub camera_device_id: u8,
7317}
7318impl CAMERA_THERMAL_RANGE_DATA {
7319    pub const ENCODED_LEN: usize = 30usize;
7320    pub const DEFAULT: Self = Self {
7321        time_boot_ms: 0_u32,
7322        max: 0.0_f32,
7323        max_point_x: 0.0_f32,
7324        max_point_y: 0.0_f32,
7325        min: 0.0_f32,
7326        min_point_x: 0.0_f32,
7327        min_point_y: 0.0_f32,
7328        stream_id: 0_u8,
7329        camera_device_id: 0_u8,
7330    };
7331    #[cfg(feature = "arbitrary")]
7332    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7333        use arbitrary::{Arbitrary, Unstructured};
7334        let mut buf = [0u8; 1024];
7335        rng.fill_bytes(&mut buf);
7336        let mut unstructured = Unstructured::new(&buf);
7337        Self::arbitrary(&mut unstructured).unwrap_or_default()
7338    }
7339}
7340impl Default for CAMERA_THERMAL_RANGE_DATA {
7341    fn default() -> Self {
7342        Self::DEFAULT.clone()
7343    }
7344}
7345impl MessageData for CAMERA_THERMAL_RANGE_DATA {
7346    type Message = MavMessage;
7347    const ID: u32 = 277u32;
7348    const NAME: &'static str = "CAMERA_THERMAL_RANGE";
7349    const EXTRA_CRC: u8 = 62u8;
7350    const ENCODED_LEN: usize = 30usize;
7351    fn deser(
7352        _version: MavlinkVersion,
7353        __input: &[u8],
7354    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7355        let avail_len = __input.len();
7356        let mut payload_buf = [0; Self::ENCODED_LEN];
7357        let mut buf = if avail_len < Self::ENCODED_LEN {
7358            payload_buf[0..avail_len].copy_from_slice(__input);
7359            Bytes::new(&payload_buf)
7360        } else {
7361            Bytes::new(__input)
7362        };
7363        let mut __struct = Self::default();
7364        __struct.time_boot_ms = buf.get_u32_le();
7365        __struct.max = buf.get_f32_le();
7366        __struct.max_point_x = buf.get_f32_le();
7367        __struct.max_point_y = buf.get_f32_le();
7368        __struct.min = buf.get_f32_le();
7369        __struct.min_point_x = buf.get_f32_le();
7370        __struct.min_point_y = buf.get_f32_le();
7371        __struct.stream_id = buf.get_u8();
7372        __struct.camera_device_id = buf.get_u8();
7373        Ok(__struct)
7374    }
7375    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7376        let mut __tmp = BytesMut::new(bytes);
7377        #[allow(clippy::absurd_extreme_comparisons)]
7378        #[allow(unused_comparisons)]
7379        if __tmp.remaining() < Self::ENCODED_LEN {
7380            panic!(
7381                "buffer is too small (need {} bytes, but got {})",
7382                Self::ENCODED_LEN,
7383                __tmp.remaining(),
7384            )
7385        }
7386        __tmp.put_u32_le(self.time_boot_ms);
7387        __tmp.put_f32_le(self.max);
7388        __tmp.put_f32_le(self.max_point_x);
7389        __tmp.put_f32_le(self.max_point_y);
7390        __tmp.put_f32_le(self.min);
7391        __tmp.put_f32_le(self.min_point_x);
7392        __tmp.put_f32_le(self.min_point_y);
7393        __tmp.put_u8(self.stream_id);
7394        __tmp.put_u8(self.camera_device_id);
7395        if matches!(version, MavlinkVersion::V2) {
7396            let len = __tmp.len();
7397            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7398        } else {
7399            __tmp.len()
7400        }
7401    }
7402}
7403#[doc = "id: 276"]
7404#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7405#[derive(Debug, Clone, PartialEq)]
7406#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7407#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7408pub struct CAMERA_TRACKING_GEO_STATUS_DATA {
7409    #[doc = "Latitude of tracked object"]
7410    pub lat: i32,
7411    #[doc = "Longitude of tracked object"]
7412    pub lon: i32,
7413    #[doc = "Altitude of tracked object(AMSL, WGS84)"]
7414    pub alt: f32,
7415    #[doc = "Horizontal accuracy. NAN if unknown"]
7416    pub h_acc: f32,
7417    #[doc = "Vertical accuracy. NAN if unknown"]
7418    pub v_acc: f32,
7419    #[doc = "North velocity of tracked object. NAN if unknown"]
7420    pub vel_n: f32,
7421    #[doc = "East velocity of tracked object. NAN if unknown"]
7422    pub vel_e: f32,
7423    #[doc = "Down velocity of tracked object. NAN if unknown"]
7424    pub vel_d: f32,
7425    #[doc = "Velocity accuracy. NAN if unknown"]
7426    pub vel_acc: f32,
7427    #[doc = "Distance between camera and tracked object. NAN if unknown"]
7428    pub dist: f32,
7429    #[doc = "Heading in radians, in NED. NAN if unknown"]
7430    pub hdg: f32,
7431    #[doc = "Accuracy of heading, in NED. NAN if unknown"]
7432    pub hdg_acc: f32,
7433    #[doc = "Current tracking status"]
7434    pub tracking_status: CameraTrackingStatusFlags,
7435    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7436    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7437    pub camera_device_id: u8,
7438}
7439impl CAMERA_TRACKING_GEO_STATUS_DATA {
7440    pub const ENCODED_LEN: usize = 50usize;
7441    pub const DEFAULT: Self = Self {
7442        lat: 0_i32,
7443        lon: 0_i32,
7444        alt: 0.0_f32,
7445        h_acc: 0.0_f32,
7446        v_acc: 0.0_f32,
7447        vel_n: 0.0_f32,
7448        vel_e: 0.0_f32,
7449        vel_d: 0.0_f32,
7450        vel_acc: 0.0_f32,
7451        dist: 0.0_f32,
7452        hdg: 0.0_f32,
7453        hdg_acc: 0.0_f32,
7454        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7455        camera_device_id: 0_u8,
7456    };
7457    #[cfg(feature = "arbitrary")]
7458    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7459        use arbitrary::{Arbitrary, Unstructured};
7460        let mut buf = [0u8; 1024];
7461        rng.fill_bytes(&mut buf);
7462        let mut unstructured = Unstructured::new(&buf);
7463        Self::arbitrary(&mut unstructured).unwrap_or_default()
7464    }
7465}
7466impl Default for CAMERA_TRACKING_GEO_STATUS_DATA {
7467    fn default() -> Self {
7468        Self::DEFAULT.clone()
7469    }
7470}
7471impl MessageData for CAMERA_TRACKING_GEO_STATUS_DATA {
7472    type Message = MavMessage;
7473    const ID: u32 = 276u32;
7474    const NAME: &'static str = "CAMERA_TRACKING_GEO_STATUS";
7475    const EXTRA_CRC: u8 = 18u8;
7476    const ENCODED_LEN: usize = 50usize;
7477    fn deser(
7478        _version: MavlinkVersion,
7479        __input: &[u8],
7480    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7481        let avail_len = __input.len();
7482        let mut payload_buf = [0; Self::ENCODED_LEN];
7483        let mut buf = if avail_len < Self::ENCODED_LEN {
7484            payload_buf[0..avail_len].copy_from_slice(__input);
7485            Bytes::new(&payload_buf)
7486        } else {
7487            Bytes::new(__input)
7488        };
7489        let mut __struct = Self::default();
7490        __struct.lat = buf.get_i32_le();
7491        __struct.lon = buf.get_i32_le();
7492        __struct.alt = buf.get_f32_le();
7493        __struct.h_acc = buf.get_f32_le();
7494        __struct.v_acc = buf.get_f32_le();
7495        __struct.vel_n = buf.get_f32_le();
7496        __struct.vel_e = buf.get_f32_le();
7497        __struct.vel_d = buf.get_f32_le();
7498        __struct.vel_acc = buf.get_f32_le();
7499        __struct.dist = buf.get_f32_le();
7500        __struct.hdg = buf.get_f32_le();
7501        __struct.hdg_acc = buf.get_f32_le();
7502        let tmp = buf.get_u8();
7503        __struct.tracking_status =
7504            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7505                enum_type: "CameraTrackingStatusFlags",
7506                value: tmp as u32,
7507            })?;
7508        __struct.camera_device_id = buf.get_u8();
7509        Ok(__struct)
7510    }
7511    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7512        let mut __tmp = BytesMut::new(bytes);
7513        #[allow(clippy::absurd_extreme_comparisons)]
7514        #[allow(unused_comparisons)]
7515        if __tmp.remaining() < Self::ENCODED_LEN {
7516            panic!(
7517                "buffer is too small (need {} bytes, but got {})",
7518                Self::ENCODED_LEN,
7519                __tmp.remaining(),
7520            )
7521        }
7522        __tmp.put_i32_le(self.lat);
7523        __tmp.put_i32_le(self.lon);
7524        __tmp.put_f32_le(self.alt);
7525        __tmp.put_f32_le(self.h_acc);
7526        __tmp.put_f32_le(self.v_acc);
7527        __tmp.put_f32_le(self.vel_n);
7528        __tmp.put_f32_le(self.vel_e);
7529        __tmp.put_f32_le(self.vel_d);
7530        __tmp.put_f32_le(self.vel_acc);
7531        __tmp.put_f32_le(self.dist);
7532        __tmp.put_f32_le(self.hdg);
7533        __tmp.put_f32_le(self.hdg_acc);
7534        __tmp.put_u8(self.tracking_status as u8);
7535        __tmp.put_u8(self.camera_device_id);
7536        if matches!(version, MavlinkVersion::V2) {
7537            let len = __tmp.len();
7538            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7539        } else {
7540            __tmp.len()
7541        }
7542    }
7543}
7544#[doc = "id: 275"]
7545#[doc = "Camera tracking status, sent while in active tracking. Use MAV_CMD_SET_MESSAGE_INTERVAL to define message interval."]
7546#[derive(Debug, Clone, PartialEq)]
7547#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7548#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7549pub struct CAMERA_TRACKING_IMAGE_STATUS_DATA {
7550    #[doc = "Current tracked point x value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7551    pub point_x: f32,
7552    #[doc = "Current tracked point y value if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7553    pub point_y: f32,
7554    #[doc = "Current tracked radius if CAMERA_TRACKING_MODE_POINT (normalized 0..1, 0 is image left, 1 is image right), NAN if unknown"]
7555    pub radius: f32,
7556    #[doc = "Current tracked rectangle top x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7557    pub rec_top_x: f32,
7558    #[doc = "Current tracked rectangle top y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7559    pub rec_top_y: f32,
7560    #[doc = "Current tracked rectangle bottom x value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is left, 1 is right), NAN if unknown"]
7561    pub rec_bottom_x: f32,
7562    #[doc = "Current tracked rectangle bottom y value if CAMERA_TRACKING_MODE_RECTANGLE (normalized 0..1, 0 is top, 1 is bottom), NAN if unknown"]
7563    pub rec_bottom_y: f32,
7564    #[doc = "Current tracking status"]
7565    pub tracking_status: CameraTrackingStatusFlags,
7566    #[doc = "Current tracking mode"]
7567    pub tracking_mode: CameraTrackingMode,
7568    #[doc = "Defines location of target data"]
7569    pub target_data: CameraTrackingTargetData,
7570    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
7571    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
7572    pub camera_device_id: u8,
7573}
7574impl CAMERA_TRACKING_IMAGE_STATUS_DATA {
7575    pub const ENCODED_LEN: usize = 32usize;
7576    pub const DEFAULT: Self = Self {
7577        point_x: 0.0_f32,
7578        point_y: 0.0_f32,
7579        radius: 0.0_f32,
7580        rec_top_x: 0.0_f32,
7581        rec_top_y: 0.0_f32,
7582        rec_bottom_x: 0.0_f32,
7583        rec_bottom_y: 0.0_f32,
7584        tracking_status: CameraTrackingStatusFlags::DEFAULT,
7585        tracking_mode: CameraTrackingMode::DEFAULT,
7586        target_data: CameraTrackingTargetData::DEFAULT,
7587        camera_device_id: 0_u8,
7588    };
7589    #[cfg(feature = "arbitrary")]
7590    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7591        use arbitrary::{Arbitrary, Unstructured};
7592        let mut buf = [0u8; 1024];
7593        rng.fill_bytes(&mut buf);
7594        let mut unstructured = Unstructured::new(&buf);
7595        Self::arbitrary(&mut unstructured).unwrap_or_default()
7596    }
7597}
7598impl Default for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7599    fn default() -> Self {
7600        Self::DEFAULT.clone()
7601    }
7602}
7603impl MessageData for CAMERA_TRACKING_IMAGE_STATUS_DATA {
7604    type Message = MavMessage;
7605    const ID: u32 = 275u32;
7606    const NAME: &'static str = "CAMERA_TRACKING_IMAGE_STATUS";
7607    const EXTRA_CRC: u8 = 126u8;
7608    const ENCODED_LEN: usize = 32usize;
7609    fn deser(
7610        _version: MavlinkVersion,
7611        __input: &[u8],
7612    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7613        let avail_len = __input.len();
7614        let mut payload_buf = [0; Self::ENCODED_LEN];
7615        let mut buf = if avail_len < Self::ENCODED_LEN {
7616            payload_buf[0..avail_len].copy_from_slice(__input);
7617            Bytes::new(&payload_buf)
7618        } else {
7619            Bytes::new(__input)
7620        };
7621        let mut __struct = Self::default();
7622        __struct.point_x = buf.get_f32_le();
7623        __struct.point_y = buf.get_f32_le();
7624        __struct.radius = buf.get_f32_le();
7625        __struct.rec_top_x = buf.get_f32_le();
7626        __struct.rec_top_y = buf.get_f32_le();
7627        __struct.rec_bottom_x = buf.get_f32_le();
7628        __struct.rec_bottom_y = buf.get_f32_le();
7629        let tmp = buf.get_u8();
7630        __struct.tracking_status =
7631            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7632                enum_type: "CameraTrackingStatusFlags",
7633                value: tmp as u32,
7634            })?;
7635        let tmp = buf.get_u8();
7636        __struct.tracking_mode =
7637            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7638                enum_type: "CameraTrackingMode",
7639                value: tmp as u32,
7640            })?;
7641        let tmp = buf.get_u8();
7642        __struct.target_data =
7643            CameraTrackingTargetData::from_bits(tmp & CameraTrackingTargetData::all().bits())
7644                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
7645                    flag_type: "CameraTrackingTargetData",
7646                    value: tmp as u32,
7647                })?;
7648        __struct.camera_device_id = buf.get_u8();
7649        Ok(__struct)
7650    }
7651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7652        let mut __tmp = BytesMut::new(bytes);
7653        #[allow(clippy::absurd_extreme_comparisons)]
7654        #[allow(unused_comparisons)]
7655        if __tmp.remaining() < Self::ENCODED_LEN {
7656            panic!(
7657                "buffer is too small (need {} bytes, but got {})",
7658                Self::ENCODED_LEN,
7659                __tmp.remaining(),
7660            )
7661        }
7662        __tmp.put_f32_le(self.point_x);
7663        __tmp.put_f32_le(self.point_y);
7664        __tmp.put_f32_le(self.radius);
7665        __tmp.put_f32_le(self.rec_top_x);
7666        __tmp.put_f32_le(self.rec_top_y);
7667        __tmp.put_f32_le(self.rec_bottom_x);
7668        __tmp.put_f32_le(self.rec_bottom_y);
7669        __tmp.put_u8(self.tracking_status as u8);
7670        __tmp.put_u8(self.tracking_mode as u8);
7671        __tmp.put_u8(self.target_data.bits());
7672        __tmp.put_u8(self.camera_device_id);
7673        if matches!(version, MavlinkVersion::V2) {
7674            let len = __tmp.len();
7675            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7676        } else {
7677            __tmp.len()
7678        }
7679    }
7680}
7681#[doc = "id: 112"]
7682#[doc = "Camera-IMU triggering and synchronisation message."]
7683#[derive(Debug, Clone, PartialEq)]
7684#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7685#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7686pub struct CAMERA_TRIGGER_DATA {
7687    #[doc = "Timestamp for image frame (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
7688    pub time_usec: u64,
7689    #[doc = "Image frame sequence"]
7690    pub seq: u32,
7691}
7692impl CAMERA_TRIGGER_DATA {
7693    pub const ENCODED_LEN: usize = 12usize;
7694    pub const DEFAULT: Self = Self {
7695        time_usec: 0_u64,
7696        seq: 0_u32,
7697    };
7698    #[cfg(feature = "arbitrary")]
7699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7700        use arbitrary::{Arbitrary, Unstructured};
7701        let mut buf = [0u8; 1024];
7702        rng.fill_bytes(&mut buf);
7703        let mut unstructured = Unstructured::new(&buf);
7704        Self::arbitrary(&mut unstructured).unwrap_or_default()
7705    }
7706}
7707impl Default for CAMERA_TRIGGER_DATA {
7708    fn default() -> Self {
7709        Self::DEFAULT.clone()
7710    }
7711}
7712impl MessageData for CAMERA_TRIGGER_DATA {
7713    type Message = MavMessage;
7714    const ID: u32 = 112u32;
7715    const NAME: &'static str = "CAMERA_TRIGGER";
7716    const EXTRA_CRC: u8 = 174u8;
7717    const ENCODED_LEN: usize = 12usize;
7718    fn deser(
7719        _version: MavlinkVersion,
7720        __input: &[u8],
7721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7722        let avail_len = __input.len();
7723        let mut payload_buf = [0; Self::ENCODED_LEN];
7724        let mut buf = if avail_len < Self::ENCODED_LEN {
7725            payload_buf[0..avail_len].copy_from_slice(__input);
7726            Bytes::new(&payload_buf)
7727        } else {
7728            Bytes::new(__input)
7729        };
7730        let mut __struct = Self::default();
7731        __struct.time_usec = buf.get_u64_le();
7732        __struct.seq = buf.get_u32_le();
7733        Ok(__struct)
7734    }
7735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7736        let mut __tmp = BytesMut::new(bytes);
7737        #[allow(clippy::absurd_extreme_comparisons)]
7738        #[allow(unused_comparisons)]
7739        if __tmp.remaining() < Self::ENCODED_LEN {
7740            panic!(
7741                "buffer is too small (need {} bytes, but got {})",
7742                Self::ENCODED_LEN,
7743                __tmp.remaining(),
7744            )
7745        }
7746        __tmp.put_u64_le(self.time_usec);
7747        __tmp.put_u32_le(self.seq);
7748        if matches!(version, MavlinkVersion::V2) {
7749            let len = __tmp.len();
7750            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7751        } else {
7752            __tmp.len()
7753        }
7754    }
7755}
7756#[doc = "id: 387"]
7757#[doc = "A forwarded CANFD frame as requested by MAV_CMD_CAN_FORWARD. These are separated from CAN_FRAME as they need different handling (eg. TAO handling)."]
7758#[derive(Debug, Clone, PartialEq)]
7759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7761pub struct CANFD_FRAME_DATA {
7762    #[doc = "Frame ID"]
7763    pub id: u32,
7764    #[doc = "System ID."]
7765    pub target_system: u8,
7766    #[doc = "Component ID."]
7767    pub target_component: u8,
7768    #[doc = "bus number"]
7769    pub bus: u8,
7770    #[doc = "Frame length"]
7771    pub len: u8,
7772    #[doc = "Frame data"]
7773    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7774    pub data: [u8; 64],
7775}
7776impl CANFD_FRAME_DATA {
7777    pub const ENCODED_LEN: usize = 72usize;
7778    pub const DEFAULT: Self = Self {
7779        id: 0_u32,
7780        target_system: 0_u8,
7781        target_component: 0_u8,
7782        bus: 0_u8,
7783        len: 0_u8,
7784        data: [0_u8; 64usize],
7785    };
7786    #[cfg(feature = "arbitrary")]
7787    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7788        use arbitrary::{Arbitrary, Unstructured};
7789        let mut buf = [0u8; 1024];
7790        rng.fill_bytes(&mut buf);
7791        let mut unstructured = Unstructured::new(&buf);
7792        Self::arbitrary(&mut unstructured).unwrap_or_default()
7793    }
7794}
7795impl Default for CANFD_FRAME_DATA {
7796    fn default() -> Self {
7797        Self::DEFAULT.clone()
7798    }
7799}
7800impl MessageData for CANFD_FRAME_DATA {
7801    type Message = MavMessage;
7802    const ID: u32 = 387u32;
7803    const NAME: &'static str = "CANFD_FRAME";
7804    const EXTRA_CRC: u8 = 4u8;
7805    const ENCODED_LEN: usize = 72usize;
7806    fn deser(
7807        _version: MavlinkVersion,
7808        __input: &[u8],
7809    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7810        let avail_len = __input.len();
7811        let mut payload_buf = [0; Self::ENCODED_LEN];
7812        let mut buf = if avail_len < Self::ENCODED_LEN {
7813            payload_buf[0..avail_len].copy_from_slice(__input);
7814            Bytes::new(&payload_buf)
7815        } else {
7816            Bytes::new(__input)
7817        };
7818        let mut __struct = Self::default();
7819        __struct.id = buf.get_u32_le();
7820        __struct.target_system = buf.get_u8();
7821        __struct.target_component = buf.get_u8();
7822        __struct.bus = buf.get_u8();
7823        __struct.len = buf.get_u8();
7824        for v in &mut __struct.data {
7825            let val = buf.get_u8();
7826            *v = val;
7827        }
7828        Ok(__struct)
7829    }
7830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7831        let mut __tmp = BytesMut::new(bytes);
7832        #[allow(clippy::absurd_extreme_comparisons)]
7833        #[allow(unused_comparisons)]
7834        if __tmp.remaining() < Self::ENCODED_LEN {
7835            panic!(
7836                "buffer is too small (need {} bytes, but got {})",
7837                Self::ENCODED_LEN,
7838                __tmp.remaining(),
7839            )
7840        }
7841        __tmp.put_u32_le(self.id);
7842        __tmp.put_u8(self.target_system);
7843        __tmp.put_u8(self.target_component);
7844        __tmp.put_u8(self.bus);
7845        __tmp.put_u8(self.len);
7846        for val in &self.data {
7847            __tmp.put_u8(*val);
7848        }
7849        if matches!(version, MavlinkVersion::V2) {
7850            let len = __tmp.len();
7851            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7852        } else {
7853            __tmp.len()
7854        }
7855    }
7856}
7857#[doc = "id: 388"]
7858#[doc = "Modify the filter of what CAN messages to forward over the mavlink. This can be used to make CAN forwarding work well on low bandwidth links. The filtering is applied on bits 8 to 24 of the CAN id (2nd and 3rd bytes) which corresponds to the DroneCAN message ID for DroneCAN. Filters with more than 16 IDs can be constructed by sending multiple CAN_FILTER_MODIFY messages."]
7859#[derive(Debug, Clone, PartialEq)]
7860#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7861#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7862pub struct CAN_FILTER_MODIFY_DATA {
7863    #[doc = "filter IDs, length num_ids"]
7864    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7865    pub ids: [u16; 16],
7866    #[doc = "System ID."]
7867    pub target_system: u8,
7868    #[doc = "Component ID."]
7869    pub target_component: u8,
7870    #[doc = "bus number"]
7871    pub bus: u8,
7872    #[doc = "what operation to perform on the filter list. See CAN_FILTER_OP enum."]
7873    pub operation: CanFilterOp,
7874    #[doc = "number of IDs in filter list"]
7875    pub num_ids: u8,
7876}
7877impl CAN_FILTER_MODIFY_DATA {
7878    pub const ENCODED_LEN: usize = 37usize;
7879    pub const DEFAULT: Self = Self {
7880        ids: [0_u16; 16usize],
7881        target_system: 0_u8,
7882        target_component: 0_u8,
7883        bus: 0_u8,
7884        operation: CanFilterOp::DEFAULT,
7885        num_ids: 0_u8,
7886    };
7887    #[cfg(feature = "arbitrary")]
7888    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7889        use arbitrary::{Arbitrary, Unstructured};
7890        let mut buf = [0u8; 1024];
7891        rng.fill_bytes(&mut buf);
7892        let mut unstructured = Unstructured::new(&buf);
7893        Self::arbitrary(&mut unstructured).unwrap_or_default()
7894    }
7895}
7896impl Default for CAN_FILTER_MODIFY_DATA {
7897    fn default() -> Self {
7898        Self::DEFAULT.clone()
7899    }
7900}
7901impl MessageData for CAN_FILTER_MODIFY_DATA {
7902    type Message = MavMessage;
7903    const ID: u32 = 388u32;
7904    const NAME: &'static str = "CAN_FILTER_MODIFY";
7905    const EXTRA_CRC: u8 = 8u8;
7906    const ENCODED_LEN: usize = 37usize;
7907    fn deser(
7908        _version: MavlinkVersion,
7909        __input: &[u8],
7910    ) -> Result<Self, ::mavlink_core::error::ParserError> {
7911        let avail_len = __input.len();
7912        let mut payload_buf = [0; Self::ENCODED_LEN];
7913        let mut buf = if avail_len < Self::ENCODED_LEN {
7914            payload_buf[0..avail_len].copy_from_slice(__input);
7915            Bytes::new(&payload_buf)
7916        } else {
7917            Bytes::new(__input)
7918        };
7919        let mut __struct = Self::default();
7920        for v in &mut __struct.ids {
7921            let val = buf.get_u16_le();
7922            *v = val;
7923        }
7924        __struct.target_system = buf.get_u8();
7925        __struct.target_component = buf.get_u8();
7926        __struct.bus = buf.get_u8();
7927        let tmp = buf.get_u8();
7928        __struct.operation =
7929            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
7930                enum_type: "CanFilterOp",
7931                value: tmp as u32,
7932            })?;
7933        __struct.num_ids = buf.get_u8();
7934        Ok(__struct)
7935    }
7936    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
7937        let mut __tmp = BytesMut::new(bytes);
7938        #[allow(clippy::absurd_extreme_comparisons)]
7939        #[allow(unused_comparisons)]
7940        if __tmp.remaining() < Self::ENCODED_LEN {
7941            panic!(
7942                "buffer is too small (need {} bytes, but got {})",
7943                Self::ENCODED_LEN,
7944                __tmp.remaining(),
7945            )
7946        }
7947        for val in &self.ids {
7948            __tmp.put_u16_le(*val);
7949        }
7950        __tmp.put_u8(self.target_system);
7951        __tmp.put_u8(self.target_component);
7952        __tmp.put_u8(self.bus);
7953        __tmp.put_u8(self.operation as u8);
7954        __tmp.put_u8(self.num_ids);
7955        if matches!(version, MavlinkVersion::V2) {
7956            let len = __tmp.len();
7957            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
7958        } else {
7959            __tmp.len()
7960        }
7961    }
7962}
7963#[doc = "id: 386"]
7964#[doc = "A forwarded CAN frame as requested by MAV_CMD_CAN_FORWARD."]
7965#[derive(Debug, Clone, PartialEq)]
7966#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
7967#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
7968pub struct CAN_FRAME_DATA {
7969    #[doc = "Frame ID"]
7970    pub id: u32,
7971    #[doc = "System ID."]
7972    pub target_system: u8,
7973    #[doc = "Component ID."]
7974    pub target_component: u8,
7975    #[doc = "Bus number"]
7976    pub bus: u8,
7977    #[doc = "Frame length"]
7978    pub len: u8,
7979    #[doc = "Frame data"]
7980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
7981    pub data: [u8; 8],
7982}
7983impl CAN_FRAME_DATA {
7984    pub const ENCODED_LEN: usize = 16usize;
7985    pub const DEFAULT: Self = Self {
7986        id: 0_u32,
7987        target_system: 0_u8,
7988        target_component: 0_u8,
7989        bus: 0_u8,
7990        len: 0_u8,
7991        data: [0_u8; 8usize],
7992    };
7993    #[cfg(feature = "arbitrary")]
7994    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
7995        use arbitrary::{Arbitrary, Unstructured};
7996        let mut buf = [0u8; 1024];
7997        rng.fill_bytes(&mut buf);
7998        let mut unstructured = Unstructured::new(&buf);
7999        Self::arbitrary(&mut unstructured).unwrap_or_default()
8000    }
8001}
8002impl Default for CAN_FRAME_DATA {
8003    fn default() -> Self {
8004        Self::DEFAULT.clone()
8005    }
8006}
8007impl MessageData for CAN_FRAME_DATA {
8008    type Message = MavMessage;
8009    const ID: u32 = 386u32;
8010    const NAME: &'static str = "CAN_FRAME";
8011    const EXTRA_CRC: u8 = 132u8;
8012    const ENCODED_LEN: usize = 16usize;
8013    fn deser(
8014        _version: MavlinkVersion,
8015        __input: &[u8],
8016    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8017        let avail_len = __input.len();
8018        let mut payload_buf = [0; Self::ENCODED_LEN];
8019        let mut buf = if avail_len < Self::ENCODED_LEN {
8020            payload_buf[0..avail_len].copy_from_slice(__input);
8021            Bytes::new(&payload_buf)
8022        } else {
8023            Bytes::new(__input)
8024        };
8025        let mut __struct = Self::default();
8026        __struct.id = buf.get_u32_le();
8027        __struct.target_system = buf.get_u8();
8028        __struct.target_component = buf.get_u8();
8029        __struct.bus = buf.get_u8();
8030        __struct.len = buf.get_u8();
8031        for v in &mut __struct.data {
8032            let val = buf.get_u8();
8033            *v = val;
8034        }
8035        Ok(__struct)
8036    }
8037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8038        let mut __tmp = BytesMut::new(bytes);
8039        #[allow(clippy::absurd_extreme_comparisons)]
8040        #[allow(unused_comparisons)]
8041        if __tmp.remaining() < Self::ENCODED_LEN {
8042            panic!(
8043                "buffer is too small (need {} bytes, but got {})",
8044                Self::ENCODED_LEN,
8045                __tmp.remaining(),
8046            )
8047        }
8048        __tmp.put_u32_le(self.id);
8049        __tmp.put_u8(self.target_system);
8050        __tmp.put_u8(self.target_component);
8051        __tmp.put_u8(self.bus);
8052        __tmp.put_u8(self.len);
8053        for val in &self.data {
8054            __tmp.put_u8(*val);
8055        }
8056        if matches!(version, MavlinkVersion::V2) {
8057            let len = __tmp.len();
8058            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8059        } else {
8060            __tmp.len()
8061        }
8062    }
8063}
8064#[doc = "id: 336"]
8065#[doc = "Configure cellular modems.         This message is re-emitted as an acknowledgement by the modem.         The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
8066#[derive(Debug, Clone, PartialEq)]
8067#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8068#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8069pub struct CELLULAR_CONFIG_DATA {
8070    #[doc = "Enable/disable LTE. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8071    pub enable_lte: u8,
8072    #[doc = "Enable/disable PIN on the SIM card. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8073    pub enable_pin: u8,
8074    #[doc = "PIN sent to the SIM card. Blank when PIN is disabled. Empty when message is sent back as a response."]
8075    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8076    pub pin: [u8; 16],
8077    #[doc = "New PIN when changing the PIN. Blank to leave it unchanged. Empty when message is sent back as a response."]
8078    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8079    pub new_pin: [u8; 16],
8080    #[doc = "Name of the cellular APN. Blank to leave it unchanged. Current APN when sent back as a response."]
8081    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8082    pub apn: [u8; 32],
8083    #[doc = "Required PUK code in case the user failed to authenticate 3 times with the PIN. Empty when message is sent back as a response."]
8084    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8085    pub puk: [u8; 16],
8086    #[doc = "Enable/disable roaming. 0: setting unchanged, 1: disabled, 2: enabled. Current setting when sent back as a response."]
8087    pub roaming: u8,
8088    #[doc = "Message acceptance response (sent back to GS)."]
8089    pub response: CellularConfigResponse,
8090}
8091impl CELLULAR_CONFIG_DATA {
8092    pub const ENCODED_LEN: usize = 84usize;
8093    pub const DEFAULT: Self = Self {
8094        enable_lte: 0_u8,
8095        enable_pin: 0_u8,
8096        pin: [0_u8; 16usize],
8097        new_pin: [0_u8; 16usize],
8098        apn: [0_u8; 32usize],
8099        puk: [0_u8; 16usize],
8100        roaming: 0_u8,
8101        response: CellularConfigResponse::DEFAULT,
8102    };
8103    #[cfg(feature = "arbitrary")]
8104    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8105        use arbitrary::{Arbitrary, Unstructured};
8106        let mut buf = [0u8; 1024];
8107        rng.fill_bytes(&mut buf);
8108        let mut unstructured = Unstructured::new(&buf);
8109        Self::arbitrary(&mut unstructured).unwrap_or_default()
8110    }
8111}
8112impl Default for CELLULAR_CONFIG_DATA {
8113    fn default() -> Self {
8114        Self::DEFAULT.clone()
8115    }
8116}
8117impl MessageData for CELLULAR_CONFIG_DATA {
8118    type Message = MavMessage;
8119    const ID: u32 = 336u32;
8120    const NAME: &'static str = "CELLULAR_CONFIG";
8121    const EXTRA_CRC: u8 = 245u8;
8122    const ENCODED_LEN: usize = 84usize;
8123    fn deser(
8124        _version: MavlinkVersion,
8125        __input: &[u8],
8126    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8127        let avail_len = __input.len();
8128        let mut payload_buf = [0; Self::ENCODED_LEN];
8129        let mut buf = if avail_len < Self::ENCODED_LEN {
8130            payload_buf[0..avail_len].copy_from_slice(__input);
8131            Bytes::new(&payload_buf)
8132        } else {
8133            Bytes::new(__input)
8134        };
8135        let mut __struct = Self::default();
8136        __struct.enable_lte = buf.get_u8();
8137        __struct.enable_pin = buf.get_u8();
8138        for v in &mut __struct.pin {
8139            let val = buf.get_u8();
8140            *v = val;
8141        }
8142        for v in &mut __struct.new_pin {
8143            let val = buf.get_u8();
8144            *v = val;
8145        }
8146        for v in &mut __struct.apn {
8147            let val = buf.get_u8();
8148            *v = val;
8149        }
8150        for v in &mut __struct.puk {
8151            let val = buf.get_u8();
8152            *v = val;
8153        }
8154        __struct.roaming = buf.get_u8();
8155        let tmp = buf.get_u8();
8156        __struct.response =
8157            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8158                enum_type: "CellularConfigResponse",
8159                value: tmp as u32,
8160            })?;
8161        Ok(__struct)
8162    }
8163    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8164        let mut __tmp = BytesMut::new(bytes);
8165        #[allow(clippy::absurd_extreme_comparisons)]
8166        #[allow(unused_comparisons)]
8167        if __tmp.remaining() < Self::ENCODED_LEN {
8168            panic!(
8169                "buffer is too small (need {} bytes, but got {})",
8170                Self::ENCODED_LEN,
8171                __tmp.remaining(),
8172            )
8173        }
8174        __tmp.put_u8(self.enable_lte);
8175        __tmp.put_u8(self.enable_pin);
8176        for val in &self.pin {
8177            __tmp.put_u8(*val);
8178        }
8179        for val in &self.new_pin {
8180            __tmp.put_u8(*val);
8181        }
8182        for val in &self.apn {
8183            __tmp.put_u8(*val);
8184        }
8185        for val in &self.puk {
8186            __tmp.put_u8(*val);
8187        }
8188        __tmp.put_u8(self.roaming);
8189        __tmp.put_u8(self.response as u8);
8190        if matches!(version, MavlinkVersion::V2) {
8191            let len = __tmp.len();
8192            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8193        } else {
8194            __tmp.len()
8195        }
8196    }
8197}
8198#[doc = "id: 334"]
8199#[doc = "Report current used cellular network status."]
8200#[derive(Debug, Clone, PartialEq)]
8201#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8202#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8203pub struct CELLULAR_STATUS_DATA {
8204    #[doc = "Mobile country code. If unknown, set to UINT16_MAX"]
8205    pub mcc: u16,
8206    #[doc = "Mobile network code. If unknown, set to UINT16_MAX"]
8207    pub mnc: u16,
8208    #[doc = "Location area code. If unknown, set to 0"]
8209    pub lac: u16,
8210    #[doc = "Cellular modem status"]
8211    pub status: CellularStatusFlag,
8212    #[doc = "Failure reason when status in in CELLULAR_STATUS_FLAG_FAILED"]
8213    pub failure_reason: CellularNetworkFailedReason,
8214    #[doc = "Cellular network radio type: gsm, cdma, lte..."]
8215    pub mavtype: CellularNetworkRadioType,
8216    #[doc = "Signal quality in percent. If unknown, set to UINT8_MAX"]
8217    pub quality: u8,
8218}
8219impl CELLULAR_STATUS_DATA {
8220    pub const ENCODED_LEN: usize = 10usize;
8221    pub const DEFAULT: Self = Self {
8222        mcc: 0_u16,
8223        mnc: 0_u16,
8224        lac: 0_u16,
8225        status: CellularStatusFlag::DEFAULT,
8226        failure_reason: CellularNetworkFailedReason::DEFAULT,
8227        mavtype: CellularNetworkRadioType::DEFAULT,
8228        quality: 0_u8,
8229    };
8230    #[cfg(feature = "arbitrary")]
8231    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8232        use arbitrary::{Arbitrary, Unstructured};
8233        let mut buf = [0u8; 1024];
8234        rng.fill_bytes(&mut buf);
8235        let mut unstructured = Unstructured::new(&buf);
8236        Self::arbitrary(&mut unstructured).unwrap_or_default()
8237    }
8238}
8239impl Default for CELLULAR_STATUS_DATA {
8240    fn default() -> Self {
8241        Self::DEFAULT.clone()
8242    }
8243}
8244impl MessageData for CELLULAR_STATUS_DATA {
8245    type Message = MavMessage;
8246    const ID: u32 = 334u32;
8247    const NAME: &'static str = "CELLULAR_STATUS";
8248    const EXTRA_CRC: u8 = 72u8;
8249    const ENCODED_LEN: usize = 10usize;
8250    fn deser(
8251        _version: MavlinkVersion,
8252        __input: &[u8],
8253    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8254        let avail_len = __input.len();
8255        let mut payload_buf = [0; Self::ENCODED_LEN];
8256        let mut buf = if avail_len < Self::ENCODED_LEN {
8257            payload_buf[0..avail_len].copy_from_slice(__input);
8258            Bytes::new(&payload_buf)
8259        } else {
8260            Bytes::new(__input)
8261        };
8262        let mut __struct = Self::default();
8263        __struct.mcc = buf.get_u16_le();
8264        __struct.mnc = buf.get_u16_le();
8265        __struct.lac = buf.get_u16_le();
8266        let tmp = buf.get_u8();
8267        __struct.status =
8268            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8269                enum_type: "CellularStatusFlag",
8270                value: tmp as u32,
8271            })?;
8272        let tmp = buf.get_u8();
8273        __struct.failure_reason =
8274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8275                enum_type: "CellularNetworkFailedReason",
8276                value: tmp as u32,
8277            })?;
8278        let tmp = buf.get_u8();
8279        __struct.mavtype =
8280            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8281                enum_type: "CellularNetworkRadioType",
8282                value: tmp as u32,
8283            })?;
8284        __struct.quality = buf.get_u8();
8285        Ok(__struct)
8286    }
8287    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8288        let mut __tmp = BytesMut::new(bytes);
8289        #[allow(clippy::absurd_extreme_comparisons)]
8290        #[allow(unused_comparisons)]
8291        if __tmp.remaining() < Self::ENCODED_LEN {
8292            panic!(
8293                "buffer is too small (need {} bytes, but got {})",
8294                Self::ENCODED_LEN,
8295                __tmp.remaining(),
8296            )
8297        }
8298        __tmp.put_u16_le(self.mcc);
8299        __tmp.put_u16_le(self.mnc);
8300        __tmp.put_u16_le(self.lac);
8301        __tmp.put_u8(self.status as u8);
8302        __tmp.put_u8(self.failure_reason as u8);
8303        __tmp.put_u8(self.mavtype as u8);
8304        __tmp.put_u8(self.quality);
8305        if matches!(version, MavlinkVersion::V2) {
8306            let len = __tmp.len();
8307            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8308        } else {
8309            __tmp.len()
8310        }
8311    }
8312}
8313#[doc = "id: 5"]
8314#[doc = "Request to control this MAV."]
8315#[derive(Debug, Clone, PartialEq)]
8316#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8317#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8318pub struct CHANGE_OPERATOR_CONTROL_DATA {
8319    #[doc = "System the GCS requests control for"]
8320    pub target_system: u8,
8321    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8322    pub control_request: u8,
8323    #[doc = "0: key as plaintext, 1-255: future, different hashing/encryption variants. The GCS should in general use the safest mode possible initially and then gradually move down the encryption level if it gets a NACK message indicating an encryption mismatch."]
8324    pub version: u8,
8325    #[doc = "Password / Key, depending on version plaintext or encrypted. 25 or less characters, NULL terminated. The characters may involve A-Z, a-z, 0-9, and \"!?,.-\""]
8326    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
8327    pub passkey: [u8; 25],
8328}
8329impl CHANGE_OPERATOR_CONTROL_DATA {
8330    pub const ENCODED_LEN: usize = 28usize;
8331    pub const DEFAULT: Self = Self {
8332        target_system: 0_u8,
8333        control_request: 0_u8,
8334        version: 0_u8,
8335        passkey: [0_u8; 25usize],
8336    };
8337    #[cfg(feature = "arbitrary")]
8338    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8339        use arbitrary::{Arbitrary, Unstructured};
8340        let mut buf = [0u8; 1024];
8341        rng.fill_bytes(&mut buf);
8342        let mut unstructured = Unstructured::new(&buf);
8343        Self::arbitrary(&mut unstructured).unwrap_or_default()
8344    }
8345}
8346impl Default for CHANGE_OPERATOR_CONTROL_DATA {
8347    fn default() -> Self {
8348        Self::DEFAULT.clone()
8349    }
8350}
8351impl MessageData for CHANGE_OPERATOR_CONTROL_DATA {
8352    type Message = MavMessage;
8353    const ID: u32 = 5u32;
8354    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL";
8355    const EXTRA_CRC: u8 = 217u8;
8356    const ENCODED_LEN: usize = 28usize;
8357    fn deser(
8358        _version: MavlinkVersion,
8359        __input: &[u8],
8360    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8361        let avail_len = __input.len();
8362        let mut payload_buf = [0; Self::ENCODED_LEN];
8363        let mut buf = if avail_len < Self::ENCODED_LEN {
8364            payload_buf[0..avail_len].copy_from_slice(__input);
8365            Bytes::new(&payload_buf)
8366        } else {
8367            Bytes::new(__input)
8368        };
8369        let mut __struct = Self::default();
8370        __struct.target_system = buf.get_u8();
8371        __struct.control_request = buf.get_u8();
8372        __struct.version = buf.get_u8();
8373        for v in &mut __struct.passkey {
8374            let val = buf.get_u8();
8375            *v = val;
8376        }
8377        Ok(__struct)
8378    }
8379    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8380        let mut __tmp = BytesMut::new(bytes);
8381        #[allow(clippy::absurd_extreme_comparisons)]
8382        #[allow(unused_comparisons)]
8383        if __tmp.remaining() < Self::ENCODED_LEN {
8384            panic!(
8385                "buffer is too small (need {} bytes, but got {})",
8386                Self::ENCODED_LEN,
8387                __tmp.remaining(),
8388            )
8389        }
8390        __tmp.put_u8(self.target_system);
8391        __tmp.put_u8(self.control_request);
8392        __tmp.put_u8(self.version);
8393        for val in &self.passkey {
8394            __tmp.put_u8(*val);
8395        }
8396        if matches!(version, MavlinkVersion::V2) {
8397            let len = __tmp.len();
8398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8399        } else {
8400            __tmp.len()
8401        }
8402    }
8403}
8404#[doc = "id: 6"]
8405#[doc = "Accept / deny control of this MAV."]
8406#[derive(Debug, Clone, PartialEq)]
8407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8409pub struct CHANGE_OPERATOR_CONTROL_ACK_DATA {
8410    #[doc = "ID of the GCS this message"]
8411    pub gcs_system_id: u8,
8412    #[doc = "0: request control of this MAV, 1: Release control of this MAV"]
8413    pub control_request: u8,
8414    #[doc = "0: ACK, 1: NACK: Wrong passkey, 2: NACK: Unsupported passkey encryption method, 3: NACK: Already under control"]
8415    pub ack: u8,
8416}
8417impl CHANGE_OPERATOR_CONTROL_ACK_DATA {
8418    pub const ENCODED_LEN: usize = 3usize;
8419    pub const DEFAULT: Self = Self {
8420        gcs_system_id: 0_u8,
8421        control_request: 0_u8,
8422        ack: 0_u8,
8423    };
8424    #[cfg(feature = "arbitrary")]
8425    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8426        use arbitrary::{Arbitrary, Unstructured};
8427        let mut buf = [0u8; 1024];
8428        rng.fill_bytes(&mut buf);
8429        let mut unstructured = Unstructured::new(&buf);
8430        Self::arbitrary(&mut unstructured).unwrap_or_default()
8431    }
8432}
8433impl Default for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8434    fn default() -> Self {
8435        Self::DEFAULT.clone()
8436    }
8437}
8438impl MessageData for CHANGE_OPERATOR_CONTROL_ACK_DATA {
8439    type Message = MavMessage;
8440    const ID: u32 = 6u32;
8441    const NAME: &'static str = "CHANGE_OPERATOR_CONTROL_ACK";
8442    const EXTRA_CRC: u8 = 104u8;
8443    const ENCODED_LEN: usize = 3usize;
8444    fn deser(
8445        _version: MavlinkVersion,
8446        __input: &[u8],
8447    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8448        let avail_len = __input.len();
8449        let mut payload_buf = [0; Self::ENCODED_LEN];
8450        let mut buf = if avail_len < Self::ENCODED_LEN {
8451            payload_buf[0..avail_len].copy_from_slice(__input);
8452            Bytes::new(&payload_buf)
8453        } else {
8454            Bytes::new(__input)
8455        };
8456        let mut __struct = Self::default();
8457        __struct.gcs_system_id = buf.get_u8();
8458        __struct.control_request = buf.get_u8();
8459        __struct.ack = buf.get_u8();
8460        Ok(__struct)
8461    }
8462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8463        let mut __tmp = BytesMut::new(bytes);
8464        #[allow(clippy::absurd_extreme_comparisons)]
8465        #[allow(unused_comparisons)]
8466        if __tmp.remaining() < Self::ENCODED_LEN {
8467            panic!(
8468                "buffer is too small (need {} bytes, but got {})",
8469                Self::ENCODED_LEN,
8470                __tmp.remaining(),
8471            )
8472        }
8473        __tmp.put_u8(self.gcs_system_id);
8474        __tmp.put_u8(self.control_request);
8475        __tmp.put_u8(self.ack);
8476        if matches!(version, MavlinkVersion::V2) {
8477            let len = __tmp.len();
8478            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8479        } else {
8480            __tmp.len()
8481        }
8482    }
8483}
8484#[doc = "id: 247"]
8485#[doc = "Information about a potential collision."]
8486#[derive(Debug, Clone, PartialEq)]
8487#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8488#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8489pub struct COLLISION_DATA {
8490    #[doc = "Unique identifier, domain based on src field"]
8491    pub id: u32,
8492    #[doc = "Estimated time until collision occurs"]
8493    pub time_to_minimum_delta: f32,
8494    #[doc = "Closest vertical distance between vehicle and object"]
8495    pub altitude_minimum_delta: f32,
8496    #[doc = "Closest horizontal distance between vehicle and object"]
8497    pub horizontal_minimum_delta: f32,
8498    #[doc = "Collision data source"]
8499    pub src: MavCollisionSrc,
8500    #[doc = "Action that is being taken to avoid this collision"]
8501    pub action: MavCollisionAction,
8502    #[doc = "How concerned the aircraft is about this collision"]
8503    pub threat_level: MavCollisionThreatLevel,
8504}
8505impl COLLISION_DATA {
8506    pub const ENCODED_LEN: usize = 19usize;
8507    pub const DEFAULT: Self = Self {
8508        id: 0_u32,
8509        time_to_minimum_delta: 0.0_f32,
8510        altitude_minimum_delta: 0.0_f32,
8511        horizontal_minimum_delta: 0.0_f32,
8512        src: MavCollisionSrc::DEFAULT,
8513        action: MavCollisionAction::DEFAULT,
8514        threat_level: MavCollisionThreatLevel::DEFAULT,
8515    };
8516    #[cfg(feature = "arbitrary")]
8517    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8518        use arbitrary::{Arbitrary, Unstructured};
8519        let mut buf = [0u8; 1024];
8520        rng.fill_bytes(&mut buf);
8521        let mut unstructured = Unstructured::new(&buf);
8522        Self::arbitrary(&mut unstructured).unwrap_or_default()
8523    }
8524}
8525impl Default for COLLISION_DATA {
8526    fn default() -> Self {
8527        Self::DEFAULT.clone()
8528    }
8529}
8530impl MessageData for COLLISION_DATA {
8531    type Message = MavMessage;
8532    const ID: u32 = 247u32;
8533    const NAME: &'static str = "COLLISION";
8534    const EXTRA_CRC: u8 = 81u8;
8535    const ENCODED_LEN: usize = 19usize;
8536    fn deser(
8537        _version: MavlinkVersion,
8538        __input: &[u8],
8539    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8540        let avail_len = __input.len();
8541        let mut payload_buf = [0; Self::ENCODED_LEN];
8542        let mut buf = if avail_len < Self::ENCODED_LEN {
8543            payload_buf[0..avail_len].copy_from_slice(__input);
8544            Bytes::new(&payload_buf)
8545        } else {
8546            Bytes::new(__input)
8547        };
8548        let mut __struct = Self::default();
8549        __struct.id = buf.get_u32_le();
8550        __struct.time_to_minimum_delta = buf.get_f32_le();
8551        __struct.altitude_minimum_delta = buf.get_f32_le();
8552        __struct.horizontal_minimum_delta = buf.get_f32_le();
8553        let tmp = buf.get_u8();
8554        __struct.src =
8555            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8556                enum_type: "MavCollisionSrc",
8557                value: tmp as u32,
8558            })?;
8559        let tmp = buf.get_u8();
8560        __struct.action =
8561            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8562                enum_type: "MavCollisionAction",
8563                value: tmp as u32,
8564            })?;
8565        let tmp = buf.get_u8();
8566        __struct.threat_level =
8567            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8568                enum_type: "MavCollisionThreatLevel",
8569                value: tmp as u32,
8570            })?;
8571        Ok(__struct)
8572    }
8573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8574        let mut __tmp = BytesMut::new(bytes);
8575        #[allow(clippy::absurd_extreme_comparisons)]
8576        #[allow(unused_comparisons)]
8577        if __tmp.remaining() < Self::ENCODED_LEN {
8578            panic!(
8579                "buffer is too small (need {} bytes, but got {})",
8580                Self::ENCODED_LEN,
8581                __tmp.remaining(),
8582            )
8583        }
8584        __tmp.put_u32_le(self.id);
8585        __tmp.put_f32_le(self.time_to_minimum_delta);
8586        __tmp.put_f32_le(self.altitude_minimum_delta);
8587        __tmp.put_f32_le(self.horizontal_minimum_delta);
8588        __tmp.put_u8(self.src as u8);
8589        __tmp.put_u8(self.action as u8);
8590        __tmp.put_u8(self.threat_level as u8);
8591        if matches!(version, MavlinkVersion::V2) {
8592            let len = __tmp.len();
8593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8594        } else {
8595            __tmp.len()
8596        }
8597    }
8598}
8599#[doc = "id: 77"]
8600#[doc = "Report status of a command. Includes feedback whether the command was executed. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8601#[derive(Debug, Clone, PartialEq)]
8602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8604pub struct COMMAND_ACK_DATA {
8605    #[doc = "Command ID (of acknowledged command)."]
8606    pub command: MavCmd,
8607    #[doc = "Result of command."]
8608    pub result: MavResult,
8609    #[doc = "The progress percentage when result is MAV_RESULT_IN_PROGRESS. Values: [0-100], or UINT8_MAX if the progress is unknown."]
8610    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8611    pub progress: u8,
8612    #[doc = "Additional result information. Can be set with a command-specific enum containing command-specific error reasons for why the command might be denied. If used, the associated enum must be documented in the corresponding MAV_CMD (this enum should have a 0 value to indicate \"unused\" or \"unknown\")."]
8613    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8614    pub result_param2: i32,
8615    #[doc = "System ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8616    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8617    pub target_system: u8,
8618    #[doc = "Component ID of the target recipient. This is the ID of the system that sent the command for which this COMMAND_ACK is an acknowledgement."]
8619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
8620    pub target_component: u8,
8621}
8622impl COMMAND_ACK_DATA {
8623    pub const ENCODED_LEN: usize = 10usize;
8624    pub const DEFAULT: Self = Self {
8625        command: MavCmd::DEFAULT,
8626        result: MavResult::DEFAULT,
8627        progress: 0_u8,
8628        result_param2: 0_i32,
8629        target_system: 0_u8,
8630        target_component: 0_u8,
8631    };
8632    #[cfg(feature = "arbitrary")]
8633    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8634        use arbitrary::{Arbitrary, Unstructured};
8635        let mut buf = [0u8; 1024];
8636        rng.fill_bytes(&mut buf);
8637        let mut unstructured = Unstructured::new(&buf);
8638        Self::arbitrary(&mut unstructured).unwrap_or_default()
8639    }
8640}
8641impl Default for COMMAND_ACK_DATA {
8642    fn default() -> Self {
8643        Self::DEFAULT.clone()
8644    }
8645}
8646impl MessageData for COMMAND_ACK_DATA {
8647    type Message = MavMessage;
8648    const ID: u32 = 77u32;
8649    const NAME: &'static str = "COMMAND_ACK";
8650    const EXTRA_CRC: u8 = 143u8;
8651    const ENCODED_LEN: usize = 10usize;
8652    fn deser(
8653        _version: MavlinkVersion,
8654        __input: &[u8],
8655    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8656        let avail_len = __input.len();
8657        let mut payload_buf = [0; Self::ENCODED_LEN];
8658        let mut buf = if avail_len < Self::ENCODED_LEN {
8659            payload_buf[0..avail_len].copy_from_slice(__input);
8660            Bytes::new(&payload_buf)
8661        } else {
8662            Bytes::new(__input)
8663        };
8664        let mut __struct = Self::default();
8665        let tmp = buf.get_u16_le();
8666        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8667            ::mavlink_core::error::ParserError::InvalidEnum {
8668                enum_type: "MavCmd",
8669                value: tmp as u32,
8670            },
8671        )?;
8672        let tmp = buf.get_u8();
8673        __struct.result =
8674            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8675                enum_type: "MavResult",
8676                value: tmp as u32,
8677            })?;
8678        __struct.progress = buf.get_u8();
8679        __struct.result_param2 = buf.get_i32_le();
8680        __struct.target_system = buf.get_u8();
8681        __struct.target_component = buf.get_u8();
8682        Ok(__struct)
8683    }
8684    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8685        let mut __tmp = BytesMut::new(bytes);
8686        #[allow(clippy::absurd_extreme_comparisons)]
8687        #[allow(unused_comparisons)]
8688        if __tmp.remaining() < Self::ENCODED_LEN {
8689            panic!(
8690                "buffer is too small (need {} bytes, but got {})",
8691                Self::ENCODED_LEN,
8692                __tmp.remaining(),
8693            )
8694        }
8695        __tmp.put_u16_le(self.command as u16);
8696        __tmp.put_u8(self.result as u8);
8697        __tmp.put_u8(self.progress);
8698        __tmp.put_i32_le(self.result_param2);
8699        __tmp.put_u8(self.target_system);
8700        __tmp.put_u8(self.target_component);
8701        if matches!(version, MavlinkVersion::V2) {
8702            let len = __tmp.len();
8703            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8704        } else {
8705            __tmp.len()
8706        }
8707    }
8708}
8709#[doc = "id: 80"]
8710#[doc = "Cancel a long running command. The target system should respond with a COMMAND_ACK to the original command with result=MAV_RESULT_CANCELLED if the long running process was cancelled. If it has already completed, the cancel action can be ignored. The cancel action can be retried until some sort of acknowledgement to the original command has been received. The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8711#[derive(Debug, Clone, PartialEq)]
8712#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8713#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8714pub struct COMMAND_CANCEL_DATA {
8715    #[doc = "Command ID (of command to cancel)."]
8716    pub command: MavCmd,
8717    #[doc = "System executing long running command. Should not be broadcast (0)."]
8718    pub target_system: u8,
8719    #[doc = "Component executing long running command."]
8720    pub target_component: u8,
8721}
8722impl COMMAND_CANCEL_DATA {
8723    pub const ENCODED_LEN: usize = 4usize;
8724    pub const DEFAULT: Self = Self {
8725        command: MavCmd::DEFAULT,
8726        target_system: 0_u8,
8727        target_component: 0_u8,
8728    };
8729    #[cfg(feature = "arbitrary")]
8730    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8731        use arbitrary::{Arbitrary, Unstructured};
8732        let mut buf = [0u8; 1024];
8733        rng.fill_bytes(&mut buf);
8734        let mut unstructured = Unstructured::new(&buf);
8735        Self::arbitrary(&mut unstructured).unwrap_or_default()
8736    }
8737}
8738impl Default for COMMAND_CANCEL_DATA {
8739    fn default() -> Self {
8740        Self::DEFAULT.clone()
8741    }
8742}
8743impl MessageData for COMMAND_CANCEL_DATA {
8744    type Message = MavMessage;
8745    const ID: u32 = 80u32;
8746    const NAME: &'static str = "COMMAND_CANCEL";
8747    const EXTRA_CRC: u8 = 14u8;
8748    const ENCODED_LEN: usize = 4usize;
8749    fn deser(
8750        _version: MavlinkVersion,
8751        __input: &[u8],
8752    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8753        let avail_len = __input.len();
8754        let mut payload_buf = [0; Self::ENCODED_LEN];
8755        let mut buf = if avail_len < Self::ENCODED_LEN {
8756            payload_buf[0..avail_len].copy_from_slice(__input);
8757            Bytes::new(&payload_buf)
8758        } else {
8759            Bytes::new(__input)
8760        };
8761        let mut __struct = Self::default();
8762        let tmp = buf.get_u16_le();
8763        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8764            ::mavlink_core::error::ParserError::InvalidEnum {
8765                enum_type: "MavCmd",
8766                value: tmp as u32,
8767            },
8768        )?;
8769        __struct.target_system = buf.get_u8();
8770        __struct.target_component = buf.get_u8();
8771        Ok(__struct)
8772    }
8773    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8774        let mut __tmp = BytesMut::new(bytes);
8775        #[allow(clippy::absurd_extreme_comparisons)]
8776        #[allow(unused_comparisons)]
8777        if __tmp.remaining() < Self::ENCODED_LEN {
8778            panic!(
8779                "buffer is too small (need {} bytes, but got {})",
8780                Self::ENCODED_LEN,
8781                __tmp.remaining(),
8782            )
8783        }
8784        __tmp.put_u16_le(self.command as u16);
8785        __tmp.put_u8(self.target_system);
8786        __tmp.put_u8(self.target_component);
8787        if matches!(version, MavlinkVersion::V2) {
8788            let len = __tmp.len();
8789            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8790        } else {
8791            __tmp.len()
8792        }
8793    }
8794}
8795#[doc = "id: 75"]
8796#[doc = "Send a command with up to seven parameters to the MAV, where params 5 and 6 are integers and the other values are floats. This is preferred over COMMAND_LONG as it allows the MAV_FRAME to be specified for interpreting positional information, such as altitude. COMMAND_INT is also preferred when sending latitude and longitude data in params 5 and 6, as it allows for greater precision. Param 5 and 6 encode positional data as scaled integers, where the scaling depends on the actual command value. NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8797#[derive(Debug, Clone, PartialEq)]
8798#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8799#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8800pub struct COMMAND_INT_DATA {
8801    #[doc = "PARAM1, see MAV_CMD enum"]
8802    pub param1: f32,
8803    #[doc = "PARAM2, see MAV_CMD enum"]
8804    pub param2: f32,
8805    #[doc = "PARAM3, see MAV_CMD enum"]
8806    pub param3: f32,
8807    #[doc = "PARAM4, see MAV_CMD enum"]
8808    pub param4: f32,
8809    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
8810    pub x: i32,
8811    #[doc = "PARAM6 / local: y position in meters * 1e4, global: longitude in degrees * 10^7"]
8812    pub y: i32,
8813    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame)."]
8814    pub z: f32,
8815    #[doc = "The scheduled action for the mission item."]
8816    pub command: MavCmd,
8817    #[doc = "System ID"]
8818    pub target_system: u8,
8819    #[doc = "Component ID"]
8820    pub target_component: u8,
8821    #[doc = "The coordinate system of the COMMAND."]
8822    pub frame: MavFrame,
8823    #[doc = "Not used."]
8824    pub current: u8,
8825    #[doc = "Not used (set 0)."]
8826    pub autocontinue: u8,
8827}
8828impl COMMAND_INT_DATA {
8829    pub const ENCODED_LEN: usize = 35usize;
8830    pub const DEFAULT: Self = Self {
8831        param1: 0.0_f32,
8832        param2: 0.0_f32,
8833        param3: 0.0_f32,
8834        param4: 0.0_f32,
8835        x: 0_i32,
8836        y: 0_i32,
8837        z: 0.0_f32,
8838        command: MavCmd::DEFAULT,
8839        target_system: 0_u8,
8840        target_component: 0_u8,
8841        frame: MavFrame::DEFAULT,
8842        current: 0_u8,
8843        autocontinue: 0_u8,
8844    };
8845    #[cfg(feature = "arbitrary")]
8846    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8847        use arbitrary::{Arbitrary, Unstructured};
8848        let mut buf = [0u8; 1024];
8849        rng.fill_bytes(&mut buf);
8850        let mut unstructured = Unstructured::new(&buf);
8851        Self::arbitrary(&mut unstructured).unwrap_or_default()
8852    }
8853}
8854impl Default for COMMAND_INT_DATA {
8855    fn default() -> Self {
8856        Self::DEFAULT.clone()
8857    }
8858}
8859impl MessageData for COMMAND_INT_DATA {
8860    type Message = MavMessage;
8861    const ID: u32 = 75u32;
8862    const NAME: &'static str = "COMMAND_INT";
8863    const EXTRA_CRC: u8 = 158u8;
8864    const ENCODED_LEN: usize = 35usize;
8865    fn deser(
8866        _version: MavlinkVersion,
8867        __input: &[u8],
8868    ) -> Result<Self, ::mavlink_core::error::ParserError> {
8869        let avail_len = __input.len();
8870        let mut payload_buf = [0; Self::ENCODED_LEN];
8871        let mut buf = if avail_len < Self::ENCODED_LEN {
8872            payload_buf[0..avail_len].copy_from_slice(__input);
8873            Bytes::new(&payload_buf)
8874        } else {
8875            Bytes::new(__input)
8876        };
8877        let mut __struct = Self::default();
8878        __struct.param1 = buf.get_f32_le();
8879        __struct.param2 = buf.get_f32_le();
8880        __struct.param3 = buf.get_f32_le();
8881        __struct.param4 = buf.get_f32_le();
8882        __struct.x = buf.get_i32_le();
8883        __struct.y = buf.get_i32_le();
8884        __struct.z = buf.get_f32_le();
8885        let tmp = buf.get_u16_le();
8886        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
8887            ::mavlink_core::error::ParserError::InvalidEnum {
8888                enum_type: "MavCmd",
8889                value: tmp as u32,
8890            },
8891        )?;
8892        __struct.target_system = buf.get_u8();
8893        __struct.target_component = buf.get_u8();
8894        let tmp = buf.get_u8();
8895        __struct.frame =
8896            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
8897                enum_type: "MavFrame",
8898                value: tmp as u32,
8899            })?;
8900        __struct.current = buf.get_u8();
8901        __struct.autocontinue = buf.get_u8();
8902        Ok(__struct)
8903    }
8904    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
8905        let mut __tmp = BytesMut::new(bytes);
8906        #[allow(clippy::absurd_extreme_comparisons)]
8907        #[allow(unused_comparisons)]
8908        if __tmp.remaining() < Self::ENCODED_LEN {
8909            panic!(
8910                "buffer is too small (need {} bytes, but got {})",
8911                Self::ENCODED_LEN,
8912                __tmp.remaining(),
8913            )
8914        }
8915        __tmp.put_f32_le(self.param1);
8916        __tmp.put_f32_le(self.param2);
8917        __tmp.put_f32_le(self.param3);
8918        __tmp.put_f32_le(self.param4);
8919        __tmp.put_i32_le(self.x);
8920        __tmp.put_i32_le(self.y);
8921        __tmp.put_f32_le(self.z);
8922        __tmp.put_u16_le(self.command as u16);
8923        __tmp.put_u8(self.target_system);
8924        __tmp.put_u8(self.target_component);
8925        __tmp.put_u8(self.frame as u8);
8926        __tmp.put_u8(self.current);
8927        __tmp.put_u8(self.autocontinue);
8928        if matches!(version, MavlinkVersion::V2) {
8929            let len = __tmp.len();
8930            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
8931        } else {
8932            __tmp.len()
8933        }
8934    }
8935}
8936#[doc = "id: 76"]
8937#[doc = "Send a command with up to seven parameters to the MAV. COMMAND_INT is generally preferred when sending MAV_CMD commands that include positional information; it offers higher precision and allows the MAV_FRAME to be specified (which may otherwise be ambiguous, particularly for altitude). The command microservice is documented at <https://mavlink.io/en/services/command.html>."]
8938#[derive(Debug, Clone, PartialEq)]
8939#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
8940#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
8941pub struct COMMAND_LONG_DATA {
8942    #[doc = "Parameter 1 (for the specific command)."]
8943    pub param1: f32,
8944    #[doc = "Parameter 2 (for the specific command)."]
8945    pub param2: f32,
8946    #[doc = "Parameter 3 (for the specific command)."]
8947    pub param3: f32,
8948    #[doc = "Parameter 4 (for the specific command)."]
8949    pub param4: f32,
8950    #[doc = "Parameter 5 (for the specific command)."]
8951    pub param5: f32,
8952    #[doc = "Parameter 6 (for the specific command)."]
8953    pub param6: f32,
8954    #[doc = "Parameter 7 (for the specific command)."]
8955    pub param7: f32,
8956    #[doc = "Command ID (of command to send)."]
8957    pub command: MavCmd,
8958    #[doc = "System which should execute the command"]
8959    pub target_system: u8,
8960    #[doc = "Component which should execute the command, 0 for all components"]
8961    pub target_component: u8,
8962    #[doc = "0: First transmission of this command. 1-255: Confirmation transmissions (e.g. for kill command)"]
8963    pub confirmation: u8,
8964}
8965impl COMMAND_LONG_DATA {
8966    pub const ENCODED_LEN: usize = 33usize;
8967    pub const DEFAULT: Self = Self {
8968        param1: 0.0_f32,
8969        param2: 0.0_f32,
8970        param3: 0.0_f32,
8971        param4: 0.0_f32,
8972        param5: 0.0_f32,
8973        param6: 0.0_f32,
8974        param7: 0.0_f32,
8975        command: MavCmd::DEFAULT,
8976        target_system: 0_u8,
8977        target_component: 0_u8,
8978        confirmation: 0_u8,
8979    };
8980    #[cfg(feature = "arbitrary")]
8981    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
8982        use arbitrary::{Arbitrary, Unstructured};
8983        let mut buf = [0u8; 1024];
8984        rng.fill_bytes(&mut buf);
8985        let mut unstructured = Unstructured::new(&buf);
8986        Self::arbitrary(&mut unstructured).unwrap_or_default()
8987    }
8988}
8989impl Default for COMMAND_LONG_DATA {
8990    fn default() -> Self {
8991        Self::DEFAULT.clone()
8992    }
8993}
8994impl MessageData for COMMAND_LONG_DATA {
8995    type Message = MavMessage;
8996    const ID: u32 = 76u32;
8997    const NAME: &'static str = "COMMAND_LONG";
8998    const EXTRA_CRC: u8 = 152u8;
8999    const ENCODED_LEN: usize = 33usize;
9000    fn deser(
9001        _version: MavlinkVersion,
9002        __input: &[u8],
9003    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9004        let avail_len = __input.len();
9005        let mut payload_buf = [0; Self::ENCODED_LEN];
9006        let mut buf = if avail_len < Self::ENCODED_LEN {
9007            payload_buf[0..avail_len].copy_from_slice(__input);
9008            Bytes::new(&payload_buf)
9009        } else {
9010            Bytes::new(__input)
9011        };
9012        let mut __struct = Self::default();
9013        __struct.param1 = buf.get_f32_le();
9014        __struct.param2 = buf.get_f32_le();
9015        __struct.param3 = buf.get_f32_le();
9016        __struct.param4 = buf.get_f32_le();
9017        __struct.param5 = buf.get_f32_le();
9018        __struct.param6 = buf.get_f32_le();
9019        __struct.param7 = buf.get_f32_le();
9020        let tmp = buf.get_u16_le();
9021        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
9022            ::mavlink_core::error::ParserError::InvalidEnum {
9023                enum_type: "MavCmd",
9024                value: tmp as u32,
9025            },
9026        )?;
9027        __struct.target_system = buf.get_u8();
9028        __struct.target_component = buf.get_u8();
9029        __struct.confirmation = buf.get_u8();
9030        Ok(__struct)
9031    }
9032    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9033        let mut __tmp = BytesMut::new(bytes);
9034        #[allow(clippy::absurd_extreme_comparisons)]
9035        #[allow(unused_comparisons)]
9036        if __tmp.remaining() < Self::ENCODED_LEN {
9037            panic!(
9038                "buffer is too small (need {} bytes, but got {})",
9039                Self::ENCODED_LEN,
9040                __tmp.remaining(),
9041            )
9042        }
9043        __tmp.put_f32_le(self.param1);
9044        __tmp.put_f32_le(self.param2);
9045        __tmp.put_f32_le(self.param3);
9046        __tmp.put_f32_le(self.param4);
9047        __tmp.put_f32_le(self.param5);
9048        __tmp.put_f32_le(self.param6);
9049        __tmp.put_f32_le(self.param7);
9050        __tmp.put_u16_le(self.command as u16);
9051        __tmp.put_u8(self.target_system);
9052        __tmp.put_u8(self.target_component);
9053        __tmp.put_u8(self.confirmation);
9054        if matches!(version, MavlinkVersion::V2) {
9055            let len = __tmp.len();
9056            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9057        } else {
9058            __tmp.len()
9059        }
9060    }
9061}
9062#[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
9063#[doc = "id: 395"]
9064#[doc = "Component information message, which may be requested using MAV_CMD_REQUEST_MESSAGE."]
9065#[derive(Debug, Clone, PartialEq)]
9066#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9067#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9068pub struct COMPONENT_INFORMATION_DATA {
9069    #[doc = "Timestamp (time since system boot)."]
9070    pub time_boot_ms: u32,
9071    #[doc = "CRC32 of the general metadata file (general_metadata_uri)."]
9072    pub general_metadata_file_crc: u32,
9073    #[doc = "CRC32 of peripherals metadata file (peripherals_metadata_uri)."]
9074    pub peripherals_metadata_file_crc: u32,
9075    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9076    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9077    pub general_metadata_uri: [u8; 100],
9078    #[doc = "(Optional) MAVLink FTP URI for the peripherals metadata file (COMP_METADATA_TYPE_PERIPHERALS), which may be compressed with xz. This contains data about \"attached components\" such as UAVCAN nodes. The peripherals are in a separate file because the information must be generated dynamically at runtime. The string needs to be zero terminated."]
9079    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9080    pub peripherals_metadata_uri: [u8; 100],
9081}
9082impl COMPONENT_INFORMATION_DATA {
9083    pub const ENCODED_LEN: usize = 212usize;
9084    pub const DEFAULT: Self = Self {
9085        time_boot_ms: 0_u32,
9086        general_metadata_file_crc: 0_u32,
9087        peripherals_metadata_file_crc: 0_u32,
9088        general_metadata_uri: [0_u8; 100usize],
9089        peripherals_metadata_uri: [0_u8; 100usize],
9090    };
9091    #[cfg(feature = "arbitrary")]
9092    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9093        use arbitrary::{Arbitrary, Unstructured};
9094        let mut buf = [0u8; 1024];
9095        rng.fill_bytes(&mut buf);
9096        let mut unstructured = Unstructured::new(&buf);
9097        Self::arbitrary(&mut unstructured).unwrap_or_default()
9098    }
9099}
9100impl Default for COMPONENT_INFORMATION_DATA {
9101    fn default() -> Self {
9102        Self::DEFAULT.clone()
9103    }
9104}
9105impl MessageData for COMPONENT_INFORMATION_DATA {
9106    type Message = MavMessage;
9107    const ID: u32 = 395u32;
9108    const NAME: &'static str = "COMPONENT_INFORMATION";
9109    const EXTRA_CRC: u8 = 0u8;
9110    const ENCODED_LEN: usize = 212usize;
9111    fn deser(
9112        _version: MavlinkVersion,
9113        __input: &[u8],
9114    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9115        let avail_len = __input.len();
9116        let mut payload_buf = [0; Self::ENCODED_LEN];
9117        let mut buf = if avail_len < Self::ENCODED_LEN {
9118            payload_buf[0..avail_len].copy_from_slice(__input);
9119            Bytes::new(&payload_buf)
9120        } else {
9121            Bytes::new(__input)
9122        };
9123        let mut __struct = Self::default();
9124        __struct.time_boot_ms = buf.get_u32_le();
9125        __struct.general_metadata_file_crc = buf.get_u32_le();
9126        __struct.peripherals_metadata_file_crc = buf.get_u32_le();
9127        for v in &mut __struct.general_metadata_uri {
9128            let val = buf.get_u8();
9129            *v = val;
9130        }
9131        for v in &mut __struct.peripherals_metadata_uri {
9132            let val = buf.get_u8();
9133            *v = val;
9134        }
9135        Ok(__struct)
9136    }
9137    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9138        let mut __tmp = BytesMut::new(bytes);
9139        #[allow(clippy::absurd_extreme_comparisons)]
9140        #[allow(unused_comparisons)]
9141        if __tmp.remaining() < Self::ENCODED_LEN {
9142            panic!(
9143                "buffer is too small (need {} bytes, but got {})",
9144                Self::ENCODED_LEN,
9145                __tmp.remaining(),
9146            )
9147        }
9148        __tmp.put_u32_le(self.time_boot_ms);
9149        __tmp.put_u32_le(self.general_metadata_file_crc);
9150        __tmp.put_u32_le(self.peripherals_metadata_file_crc);
9151        for val in &self.general_metadata_uri {
9152            __tmp.put_u8(*val);
9153        }
9154        for val in &self.peripherals_metadata_uri {
9155            __tmp.put_u8(*val);
9156        }
9157        if matches!(version, MavlinkVersion::V2) {
9158            let len = __tmp.len();
9159            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9160        } else {
9161            __tmp.len()
9162        }
9163    }
9164}
9165#[doc = "id: 396"]
9166#[doc = "Basic component information data. Should be requested using MAV_CMD_REQUEST_MESSAGE on startup, or when required."]
9167#[derive(Debug, Clone, PartialEq)]
9168#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9169#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9170pub struct COMPONENT_INFORMATION_BASIC_DATA {
9171    #[doc = "Component capability flags"]
9172    pub capabilities: MavProtocolCapability,
9173    #[doc = "Timestamp (time since system boot)."]
9174    pub time_boot_ms: u32,
9175    #[doc = "Date of manufacture as a UNIX Epoch time (since 1.1.1970) in seconds."]
9176    pub time_manufacture_s: u32,
9177    #[doc = "Name of the component vendor. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9178    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9179    pub vendor_name: [u8; 32],
9180    #[doc = "Name of the component model. Needs to be zero terminated. The field is optional and can be empty/all zeros."]
9181    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9182    pub model_name: [u8; 32],
9183    #[doc = "Software version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9184    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9185    pub software_version: [u8; 24],
9186    #[doc = "Hardware version. The recommended format is SEMVER: 'major.minor.patch'  (any format may be used). The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9187    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9188    pub hardware_version: [u8; 24],
9189    #[doc = "Hardware serial number. The field must be zero terminated if it has a value. The field is optional and can be empty/all zeros."]
9190    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9191    pub serial_number: [u8; 32],
9192}
9193impl COMPONENT_INFORMATION_BASIC_DATA {
9194    pub const ENCODED_LEN: usize = 160usize;
9195    pub const DEFAULT: Self = Self {
9196        capabilities: MavProtocolCapability::DEFAULT,
9197        time_boot_ms: 0_u32,
9198        time_manufacture_s: 0_u32,
9199        vendor_name: [0_u8; 32usize],
9200        model_name: [0_u8; 32usize],
9201        software_version: [0_u8; 24usize],
9202        hardware_version: [0_u8; 24usize],
9203        serial_number: [0_u8; 32usize],
9204    };
9205    #[cfg(feature = "arbitrary")]
9206    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9207        use arbitrary::{Arbitrary, Unstructured};
9208        let mut buf = [0u8; 1024];
9209        rng.fill_bytes(&mut buf);
9210        let mut unstructured = Unstructured::new(&buf);
9211        Self::arbitrary(&mut unstructured).unwrap_or_default()
9212    }
9213}
9214impl Default for COMPONENT_INFORMATION_BASIC_DATA {
9215    fn default() -> Self {
9216        Self::DEFAULT.clone()
9217    }
9218}
9219impl MessageData for COMPONENT_INFORMATION_BASIC_DATA {
9220    type Message = MavMessage;
9221    const ID: u32 = 396u32;
9222    const NAME: &'static str = "COMPONENT_INFORMATION_BASIC";
9223    const EXTRA_CRC: u8 = 50u8;
9224    const ENCODED_LEN: usize = 160usize;
9225    fn deser(
9226        _version: MavlinkVersion,
9227        __input: &[u8],
9228    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9229        let avail_len = __input.len();
9230        let mut payload_buf = [0; Self::ENCODED_LEN];
9231        let mut buf = if avail_len < Self::ENCODED_LEN {
9232            payload_buf[0..avail_len].copy_from_slice(__input);
9233            Bytes::new(&payload_buf)
9234        } else {
9235            Bytes::new(__input)
9236        };
9237        let mut __struct = Self::default();
9238        let tmp = buf.get_u64_le();
9239        __struct.capabilities = MavProtocolCapability::from_bits(
9240            tmp & MavProtocolCapability::all().bits(),
9241        )
9242        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
9243            flag_type: "MavProtocolCapability",
9244            value: tmp as u32,
9245        })?;
9246        __struct.time_boot_ms = buf.get_u32_le();
9247        __struct.time_manufacture_s = buf.get_u32_le();
9248        for v in &mut __struct.vendor_name {
9249            let val = buf.get_u8();
9250            *v = val;
9251        }
9252        for v in &mut __struct.model_name {
9253            let val = buf.get_u8();
9254            *v = val;
9255        }
9256        for v in &mut __struct.software_version {
9257            let val = buf.get_u8();
9258            *v = val;
9259        }
9260        for v in &mut __struct.hardware_version {
9261            let val = buf.get_u8();
9262            *v = val;
9263        }
9264        for v in &mut __struct.serial_number {
9265            let val = buf.get_u8();
9266            *v = val;
9267        }
9268        Ok(__struct)
9269    }
9270    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9271        let mut __tmp = BytesMut::new(bytes);
9272        #[allow(clippy::absurd_extreme_comparisons)]
9273        #[allow(unused_comparisons)]
9274        if __tmp.remaining() < Self::ENCODED_LEN {
9275            panic!(
9276                "buffer is too small (need {} bytes, but got {})",
9277                Self::ENCODED_LEN,
9278                __tmp.remaining(),
9279            )
9280        }
9281        __tmp.put_u64_le(self.capabilities.bits());
9282        __tmp.put_u32_le(self.time_boot_ms);
9283        __tmp.put_u32_le(self.time_manufacture_s);
9284        for val in &self.vendor_name {
9285            __tmp.put_u8(*val);
9286        }
9287        for val in &self.model_name {
9288            __tmp.put_u8(*val);
9289        }
9290        for val in &self.software_version {
9291            __tmp.put_u8(*val);
9292        }
9293        for val in &self.hardware_version {
9294            __tmp.put_u8(*val);
9295        }
9296        for val in &self.serial_number {
9297            __tmp.put_u8(*val);
9298        }
9299        if matches!(version, MavlinkVersion::V2) {
9300            let len = __tmp.len();
9301            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9302        } else {
9303            __tmp.len()
9304        }
9305    }
9306}
9307#[doc = "id: 397"]
9308#[doc = "Component metadata message, which may be requested using MAV_CMD_REQUEST_MESSAGE.          This contains the MAVLink FTP URI and CRC for the component's general metadata file.         The file must be hosted on the component, and may be xz compressed.         The file CRC can be used for file caching.          The general metadata file can be read to get the locations of other metadata files (COMP_METADATA_TYPE) and translations, which may be hosted either on the vehicle or the internet.         For more information see: <https://mavlink.io/en/services/component_information.html>.          Note: Camera components should use CAMERA_INFORMATION instead, and autopilots may use both this message and AUTOPILOT_VERSION."]
9309#[derive(Debug, Clone, PartialEq)]
9310#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9311#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9312pub struct COMPONENT_METADATA_DATA {
9313    #[doc = "Timestamp (time since system boot)."]
9314    pub time_boot_ms: u32,
9315    #[doc = "CRC32 of the general metadata file."]
9316    pub file_crc: u32,
9317    #[doc = "MAVLink FTP URI for the general metadata file (COMP_METADATA_TYPE_GENERAL), which may be compressed with xz. The file contains general component metadata, and may contain URI links for additional metadata (see COMP_METADATA_TYPE). The information is static from boot, and may be generated at compile time. The string needs to be zero terminated."]
9318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9319    pub uri: [u8; 100],
9320}
9321impl COMPONENT_METADATA_DATA {
9322    pub const ENCODED_LEN: usize = 108usize;
9323    pub const DEFAULT: Self = Self {
9324        time_boot_ms: 0_u32,
9325        file_crc: 0_u32,
9326        uri: [0_u8; 100usize],
9327    };
9328    #[cfg(feature = "arbitrary")]
9329    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9330        use arbitrary::{Arbitrary, Unstructured};
9331        let mut buf = [0u8; 1024];
9332        rng.fill_bytes(&mut buf);
9333        let mut unstructured = Unstructured::new(&buf);
9334        Self::arbitrary(&mut unstructured).unwrap_or_default()
9335    }
9336}
9337impl Default for COMPONENT_METADATA_DATA {
9338    fn default() -> Self {
9339        Self::DEFAULT.clone()
9340    }
9341}
9342impl MessageData for COMPONENT_METADATA_DATA {
9343    type Message = MavMessage;
9344    const ID: u32 = 397u32;
9345    const NAME: &'static str = "COMPONENT_METADATA";
9346    const EXTRA_CRC: u8 = 182u8;
9347    const ENCODED_LEN: usize = 108usize;
9348    fn deser(
9349        _version: MavlinkVersion,
9350        __input: &[u8],
9351    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9352        let avail_len = __input.len();
9353        let mut payload_buf = [0; Self::ENCODED_LEN];
9354        let mut buf = if avail_len < Self::ENCODED_LEN {
9355            payload_buf[0..avail_len].copy_from_slice(__input);
9356            Bytes::new(&payload_buf)
9357        } else {
9358            Bytes::new(__input)
9359        };
9360        let mut __struct = Self::default();
9361        __struct.time_boot_ms = buf.get_u32_le();
9362        __struct.file_crc = buf.get_u32_le();
9363        for v in &mut __struct.uri {
9364            let val = buf.get_u8();
9365            *v = val;
9366        }
9367        Ok(__struct)
9368    }
9369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9370        let mut __tmp = BytesMut::new(bytes);
9371        #[allow(clippy::absurd_extreme_comparisons)]
9372        #[allow(unused_comparisons)]
9373        if __tmp.remaining() < Self::ENCODED_LEN {
9374            panic!(
9375                "buffer is too small (need {} bytes, but got {})",
9376                Self::ENCODED_LEN,
9377                __tmp.remaining(),
9378            )
9379        }
9380        __tmp.put_u32_le(self.time_boot_ms);
9381        __tmp.put_u32_le(self.file_crc);
9382        for val in &self.uri {
9383            __tmp.put_u8(*val);
9384        }
9385        if matches!(version, MavlinkVersion::V2) {
9386            let len = __tmp.len();
9387            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9388        } else {
9389            __tmp.len()
9390        }
9391    }
9392}
9393#[doc = "id: 146"]
9394#[doc = "The smoothed, monotonic system state used to feed the control loops of the system."]
9395#[derive(Debug, Clone, PartialEq)]
9396#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9397#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9398pub struct CONTROL_SYSTEM_STATE_DATA {
9399    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9400    pub time_usec: u64,
9401    #[doc = "X acceleration in body frame"]
9402    pub x_acc: f32,
9403    #[doc = "Y acceleration in body frame"]
9404    pub y_acc: f32,
9405    #[doc = "Z acceleration in body frame"]
9406    pub z_acc: f32,
9407    #[doc = "X velocity in body frame"]
9408    pub x_vel: f32,
9409    #[doc = "Y velocity in body frame"]
9410    pub y_vel: f32,
9411    #[doc = "Z velocity in body frame"]
9412    pub z_vel: f32,
9413    #[doc = "X position in local frame"]
9414    pub x_pos: f32,
9415    #[doc = "Y position in local frame"]
9416    pub y_pos: f32,
9417    #[doc = "Z position in local frame"]
9418    pub z_pos: f32,
9419    #[doc = "Airspeed, set to -1 if unknown"]
9420    pub airspeed: f32,
9421    #[doc = "Variance of body velocity estimate"]
9422    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9423    pub vel_variance: [f32; 3],
9424    #[doc = "Variance in local position"]
9425    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9426    pub pos_variance: [f32; 3],
9427    #[doc = "The attitude, represented as Quaternion"]
9428    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
9429    pub q: [f32; 4],
9430    #[doc = "Angular rate in roll axis"]
9431    pub roll_rate: f32,
9432    #[doc = "Angular rate in pitch axis"]
9433    pub pitch_rate: f32,
9434    #[doc = "Angular rate in yaw axis"]
9435    pub yaw_rate: f32,
9436}
9437impl CONTROL_SYSTEM_STATE_DATA {
9438    pub const ENCODED_LEN: usize = 100usize;
9439    pub const DEFAULT: Self = Self {
9440        time_usec: 0_u64,
9441        x_acc: 0.0_f32,
9442        y_acc: 0.0_f32,
9443        z_acc: 0.0_f32,
9444        x_vel: 0.0_f32,
9445        y_vel: 0.0_f32,
9446        z_vel: 0.0_f32,
9447        x_pos: 0.0_f32,
9448        y_pos: 0.0_f32,
9449        z_pos: 0.0_f32,
9450        airspeed: 0.0_f32,
9451        vel_variance: [0.0_f32; 3usize],
9452        pos_variance: [0.0_f32; 3usize],
9453        q: [0.0_f32; 4usize],
9454        roll_rate: 0.0_f32,
9455        pitch_rate: 0.0_f32,
9456        yaw_rate: 0.0_f32,
9457    };
9458    #[cfg(feature = "arbitrary")]
9459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9460        use arbitrary::{Arbitrary, Unstructured};
9461        let mut buf = [0u8; 1024];
9462        rng.fill_bytes(&mut buf);
9463        let mut unstructured = Unstructured::new(&buf);
9464        Self::arbitrary(&mut unstructured).unwrap_or_default()
9465    }
9466}
9467impl Default for CONTROL_SYSTEM_STATE_DATA {
9468    fn default() -> Self {
9469        Self::DEFAULT.clone()
9470    }
9471}
9472impl MessageData for CONTROL_SYSTEM_STATE_DATA {
9473    type Message = MavMessage;
9474    const ID: u32 = 146u32;
9475    const NAME: &'static str = "CONTROL_SYSTEM_STATE";
9476    const EXTRA_CRC: u8 = 103u8;
9477    const ENCODED_LEN: usize = 100usize;
9478    fn deser(
9479        _version: MavlinkVersion,
9480        __input: &[u8],
9481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9482        let avail_len = __input.len();
9483        let mut payload_buf = [0; Self::ENCODED_LEN];
9484        let mut buf = if avail_len < Self::ENCODED_LEN {
9485            payload_buf[0..avail_len].copy_from_slice(__input);
9486            Bytes::new(&payload_buf)
9487        } else {
9488            Bytes::new(__input)
9489        };
9490        let mut __struct = Self::default();
9491        __struct.time_usec = buf.get_u64_le();
9492        __struct.x_acc = buf.get_f32_le();
9493        __struct.y_acc = buf.get_f32_le();
9494        __struct.z_acc = buf.get_f32_le();
9495        __struct.x_vel = buf.get_f32_le();
9496        __struct.y_vel = buf.get_f32_le();
9497        __struct.z_vel = buf.get_f32_le();
9498        __struct.x_pos = buf.get_f32_le();
9499        __struct.y_pos = buf.get_f32_le();
9500        __struct.z_pos = buf.get_f32_le();
9501        __struct.airspeed = buf.get_f32_le();
9502        for v in &mut __struct.vel_variance {
9503            let val = buf.get_f32_le();
9504            *v = val;
9505        }
9506        for v in &mut __struct.pos_variance {
9507            let val = buf.get_f32_le();
9508            *v = val;
9509        }
9510        for v in &mut __struct.q {
9511            let val = buf.get_f32_le();
9512            *v = val;
9513        }
9514        __struct.roll_rate = buf.get_f32_le();
9515        __struct.pitch_rate = buf.get_f32_le();
9516        __struct.yaw_rate = buf.get_f32_le();
9517        Ok(__struct)
9518    }
9519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9520        let mut __tmp = BytesMut::new(bytes);
9521        #[allow(clippy::absurd_extreme_comparisons)]
9522        #[allow(unused_comparisons)]
9523        if __tmp.remaining() < Self::ENCODED_LEN {
9524            panic!(
9525                "buffer is too small (need {} bytes, but got {})",
9526                Self::ENCODED_LEN,
9527                __tmp.remaining(),
9528            )
9529        }
9530        __tmp.put_u64_le(self.time_usec);
9531        __tmp.put_f32_le(self.x_acc);
9532        __tmp.put_f32_le(self.y_acc);
9533        __tmp.put_f32_le(self.z_acc);
9534        __tmp.put_f32_le(self.x_vel);
9535        __tmp.put_f32_le(self.y_vel);
9536        __tmp.put_f32_le(self.z_vel);
9537        __tmp.put_f32_le(self.x_pos);
9538        __tmp.put_f32_le(self.y_pos);
9539        __tmp.put_f32_le(self.z_pos);
9540        __tmp.put_f32_le(self.airspeed);
9541        for val in &self.vel_variance {
9542            __tmp.put_f32_le(*val);
9543        }
9544        for val in &self.pos_variance {
9545            __tmp.put_f32_le(*val);
9546        }
9547        for val in &self.q {
9548            __tmp.put_f32_le(*val);
9549        }
9550        __tmp.put_f32_le(self.roll_rate);
9551        __tmp.put_f32_le(self.pitch_rate);
9552        __tmp.put_f32_le(self.yaw_rate);
9553        if matches!(version, MavlinkVersion::V2) {
9554            let len = __tmp.len();
9555            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9556        } else {
9557            __tmp.len()
9558        }
9559    }
9560}
9561#[doc = "id: 411"]
9562#[doc = "Regular broadcast for the current latest event sequence number for a component. This is used to check for dropped events."]
9563#[derive(Debug, Clone, PartialEq)]
9564#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9565#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9566pub struct CURRENT_EVENT_SEQUENCE_DATA {
9567    #[doc = "Sequence number."]
9568    pub sequence: u16,
9569    #[doc = "Flag bitset."]
9570    pub flags: MavEventCurrentSequenceFlags,
9571}
9572impl CURRENT_EVENT_SEQUENCE_DATA {
9573    pub const ENCODED_LEN: usize = 3usize;
9574    pub const DEFAULT: Self = Self {
9575        sequence: 0_u16,
9576        flags: MavEventCurrentSequenceFlags::DEFAULT,
9577    };
9578    #[cfg(feature = "arbitrary")]
9579    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9580        use arbitrary::{Arbitrary, Unstructured};
9581        let mut buf = [0u8; 1024];
9582        rng.fill_bytes(&mut buf);
9583        let mut unstructured = Unstructured::new(&buf);
9584        Self::arbitrary(&mut unstructured).unwrap_or_default()
9585    }
9586}
9587impl Default for CURRENT_EVENT_SEQUENCE_DATA {
9588    fn default() -> Self {
9589        Self::DEFAULT.clone()
9590    }
9591}
9592impl MessageData for CURRENT_EVENT_SEQUENCE_DATA {
9593    type Message = MavMessage;
9594    const ID: u32 = 411u32;
9595    const NAME: &'static str = "CURRENT_EVENT_SEQUENCE";
9596    const EXTRA_CRC: u8 = 106u8;
9597    const ENCODED_LEN: usize = 3usize;
9598    fn deser(
9599        _version: MavlinkVersion,
9600        __input: &[u8],
9601    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9602        let avail_len = __input.len();
9603        let mut payload_buf = [0; Self::ENCODED_LEN];
9604        let mut buf = if avail_len < Self::ENCODED_LEN {
9605            payload_buf[0..avail_len].copy_from_slice(__input);
9606            Bytes::new(&payload_buf)
9607        } else {
9608            Bytes::new(__input)
9609        };
9610        let mut __struct = Self::default();
9611        __struct.sequence = buf.get_u16_le();
9612        let tmp = buf.get_u8();
9613        __struct.flags =
9614            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9615                enum_type: "MavEventCurrentSequenceFlags",
9616                value: tmp as u32,
9617            })?;
9618        Ok(__struct)
9619    }
9620    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9621        let mut __tmp = BytesMut::new(bytes);
9622        #[allow(clippy::absurd_extreme_comparisons)]
9623        #[allow(unused_comparisons)]
9624        if __tmp.remaining() < Self::ENCODED_LEN {
9625            panic!(
9626                "buffer is too small (need {} bytes, but got {})",
9627                Self::ENCODED_LEN,
9628                __tmp.remaining(),
9629            )
9630        }
9631        __tmp.put_u16_le(self.sequence);
9632        __tmp.put_u8(self.flags as u8);
9633        if matches!(version, MavlinkVersion::V2) {
9634            let len = __tmp.len();
9635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9636        } else {
9637            __tmp.len()
9638        }
9639    }
9640}
9641#[doc = "id: 436"]
9642#[doc = "Get the current mode.         This should be emitted on any mode change, and broadcast at low rate (nominally 0.5 Hz).         It may be requested using MAV_CMD_REQUEST_MESSAGE.         See <https://mavlink.io/en/services/standard_modes.html>."]
9643#[derive(Debug, Clone, PartialEq)]
9644#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9645#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9646pub struct CURRENT_MODE_DATA {
9647    #[doc = "A bitfield for use for autopilot-specific flags"]
9648    pub custom_mode: u32,
9649    #[doc = "The custom_mode of the mode that was last commanded by the user (for example, with MAV_CMD_DO_SET_STANDARD_MODE, MAV_CMD_DO_SET_MODE or via RC). This should usually be the same as custom_mode. It will be different if the vehicle is unable to enter the intended mode, or has left that mode due to a failsafe condition. 0 indicates the intended custom mode is unknown/not supplied"]
9650    pub intended_custom_mode: u32,
9651    #[doc = "Standard mode."]
9652    pub standard_mode: MavStandardMode,
9653}
9654impl CURRENT_MODE_DATA {
9655    pub const ENCODED_LEN: usize = 9usize;
9656    pub const DEFAULT: Self = Self {
9657        custom_mode: 0_u32,
9658        intended_custom_mode: 0_u32,
9659        standard_mode: MavStandardMode::DEFAULT,
9660    };
9661    #[cfg(feature = "arbitrary")]
9662    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9663        use arbitrary::{Arbitrary, Unstructured};
9664        let mut buf = [0u8; 1024];
9665        rng.fill_bytes(&mut buf);
9666        let mut unstructured = Unstructured::new(&buf);
9667        Self::arbitrary(&mut unstructured).unwrap_or_default()
9668    }
9669}
9670impl Default for CURRENT_MODE_DATA {
9671    fn default() -> Self {
9672        Self::DEFAULT.clone()
9673    }
9674}
9675impl MessageData for CURRENT_MODE_DATA {
9676    type Message = MavMessage;
9677    const ID: u32 = 436u32;
9678    const NAME: &'static str = "CURRENT_MODE";
9679    const EXTRA_CRC: u8 = 193u8;
9680    const ENCODED_LEN: usize = 9usize;
9681    fn deser(
9682        _version: MavlinkVersion,
9683        __input: &[u8],
9684    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9685        let avail_len = __input.len();
9686        let mut payload_buf = [0; Self::ENCODED_LEN];
9687        let mut buf = if avail_len < Self::ENCODED_LEN {
9688            payload_buf[0..avail_len].copy_from_slice(__input);
9689            Bytes::new(&payload_buf)
9690        } else {
9691            Bytes::new(__input)
9692        };
9693        let mut __struct = Self::default();
9694        __struct.custom_mode = buf.get_u32_le();
9695        __struct.intended_custom_mode = buf.get_u32_le();
9696        let tmp = buf.get_u8();
9697        __struct.standard_mode =
9698            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9699                enum_type: "MavStandardMode",
9700                value: tmp as u32,
9701            })?;
9702        Ok(__struct)
9703    }
9704    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9705        let mut __tmp = BytesMut::new(bytes);
9706        #[allow(clippy::absurd_extreme_comparisons)]
9707        #[allow(unused_comparisons)]
9708        if __tmp.remaining() < Self::ENCODED_LEN {
9709            panic!(
9710                "buffer is too small (need {} bytes, but got {})",
9711                Self::ENCODED_LEN,
9712                __tmp.remaining(),
9713            )
9714        }
9715        __tmp.put_u32_le(self.custom_mode);
9716        __tmp.put_u32_le(self.intended_custom_mode);
9717        __tmp.put_u8(self.standard_mode as u8);
9718        if matches!(version, MavlinkVersion::V2) {
9719            let len = __tmp.len();
9720            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9721        } else {
9722            __tmp.len()
9723        }
9724    }
9725}
9726#[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
9727#[doc = "id: 67"]
9728#[doc = "Data stream status information."]
9729#[derive(Debug, Clone, PartialEq)]
9730#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9731#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9732pub struct DATA_STREAM_DATA {
9733    #[doc = "The message rate"]
9734    pub message_rate: u16,
9735    #[doc = "The ID of the requested data stream"]
9736    pub stream_id: u8,
9737    #[doc = "1 stream is enabled, 0 stream is stopped."]
9738    pub on_off: u8,
9739}
9740impl DATA_STREAM_DATA {
9741    pub const ENCODED_LEN: usize = 4usize;
9742    pub const DEFAULT: Self = Self {
9743        message_rate: 0_u16,
9744        stream_id: 0_u8,
9745        on_off: 0_u8,
9746    };
9747    #[cfg(feature = "arbitrary")]
9748    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9749        use arbitrary::{Arbitrary, Unstructured};
9750        let mut buf = [0u8; 1024];
9751        rng.fill_bytes(&mut buf);
9752        let mut unstructured = Unstructured::new(&buf);
9753        Self::arbitrary(&mut unstructured).unwrap_or_default()
9754    }
9755}
9756impl Default for DATA_STREAM_DATA {
9757    fn default() -> Self {
9758        Self::DEFAULT.clone()
9759    }
9760}
9761impl MessageData for DATA_STREAM_DATA {
9762    type Message = MavMessage;
9763    const ID: u32 = 67u32;
9764    const NAME: &'static str = "DATA_STREAM";
9765    const EXTRA_CRC: u8 = 21u8;
9766    const ENCODED_LEN: usize = 4usize;
9767    fn deser(
9768        _version: MavlinkVersion,
9769        __input: &[u8],
9770    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9771        let avail_len = __input.len();
9772        let mut payload_buf = [0; Self::ENCODED_LEN];
9773        let mut buf = if avail_len < Self::ENCODED_LEN {
9774            payload_buf[0..avail_len].copy_from_slice(__input);
9775            Bytes::new(&payload_buf)
9776        } else {
9777            Bytes::new(__input)
9778        };
9779        let mut __struct = Self::default();
9780        __struct.message_rate = buf.get_u16_le();
9781        __struct.stream_id = buf.get_u8();
9782        __struct.on_off = buf.get_u8();
9783        Ok(__struct)
9784    }
9785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9786        let mut __tmp = BytesMut::new(bytes);
9787        #[allow(clippy::absurd_extreme_comparisons)]
9788        #[allow(unused_comparisons)]
9789        if __tmp.remaining() < Self::ENCODED_LEN {
9790            panic!(
9791                "buffer is too small (need {} bytes, but got {})",
9792                Self::ENCODED_LEN,
9793                __tmp.remaining(),
9794            )
9795        }
9796        __tmp.put_u16_le(self.message_rate);
9797        __tmp.put_u8(self.stream_id);
9798        __tmp.put_u8(self.on_off);
9799        if matches!(version, MavlinkVersion::V2) {
9800            let len = __tmp.len();
9801            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9802        } else {
9803            __tmp.len()
9804        }
9805    }
9806}
9807#[doc = "id: 130"]
9808#[doc = "Handshake message to initiate, control and stop image streaming when using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
9809#[derive(Debug, Clone, PartialEq)]
9810#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9811#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9812pub struct DATA_TRANSMISSION_HANDSHAKE_DATA {
9813    #[doc = "total data size (set on ACK only)."]
9814    pub size: u32,
9815    #[doc = "Width of a matrix or image."]
9816    pub width: u16,
9817    #[doc = "Height of a matrix or image."]
9818    pub height: u16,
9819    #[doc = "Number of packets being sent (set on ACK only)."]
9820    pub packets: u16,
9821    #[doc = "Type of requested/acknowledged data."]
9822    pub mavtype: MavlinkDataStreamType,
9823    #[doc = "Payload size per packet (normally 253 byte, see DATA field size in message ENCAPSULATED_DATA) (set on ACK only)."]
9824    pub payload: u8,
9825    #[doc = "JPEG quality. Values: [1-100]."]
9826    pub jpg_quality: u8,
9827}
9828impl DATA_TRANSMISSION_HANDSHAKE_DATA {
9829    pub const ENCODED_LEN: usize = 13usize;
9830    pub const DEFAULT: Self = Self {
9831        size: 0_u32,
9832        width: 0_u16,
9833        height: 0_u16,
9834        packets: 0_u16,
9835        mavtype: MavlinkDataStreamType::DEFAULT,
9836        payload: 0_u8,
9837        jpg_quality: 0_u8,
9838    };
9839    #[cfg(feature = "arbitrary")]
9840    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9841        use arbitrary::{Arbitrary, Unstructured};
9842        let mut buf = [0u8; 1024];
9843        rng.fill_bytes(&mut buf);
9844        let mut unstructured = Unstructured::new(&buf);
9845        Self::arbitrary(&mut unstructured).unwrap_or_default()
9846    }
9847}
9848impl Default for DATA_TRANSMISSION_HANDSHAKE_DATA {
9849    fn default() -> Self {
9850        Self::DEFAULT.clone()
9851    }
9852}
9853impl MessageData for DATA_TRANSMISSION_HANDSHAKE_DATA {
9854    type Message = MavMessage;
9855    const ID: u32 = 130u32;
9856    const NAME: &'static str = "DATA_TRANSMISSION_HANDSHAKE";
9857    const EXTRA_CRC: u8 = 29u8;
9858    const ENCODED_LEN: usize = 13usize;
9859    fn deser(
9860        _version: MavlinkVersion,
9861        __input: &[u8],
9862    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9863        let avail_len = __input.len();
9864        let mut payload_buf = [0; Self::ENCODED_LEN];
9865        let mut buf = if avail_len < Self::ENCODED_LEN {
9866            payload_buf[0..avail_len].copy_from_slice(__input);
9867            Bytes::new(&payload_buf)
9868        } else {
9869            Bytes::new(__input)
9870        };
9871        let mut __struct = Self::default();
9872        __struct.size = buf.get_u32_le();
9873        __struct.width = buf.get_u16_le();
9874        __struct.height = buf.get_u16_le();
9875        __struct.packets = buf.get_u16_le();
9876        let tmp = buf.get_u8();
9877        __struct.mavtype =
9878            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
9879                enum_type: "MavlinkDataStreamType",
9880                value: tmp as u32,
9881            })?;
9882        __struct.payload = buf.get_u8();
9883        __struct.jpg_quality = buf.get_u8();
9884        Ok(__struct)
9885    }
9886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9887        let mut __tmp = BytesMut::new(bytes);
9888        #[allow(clippy::absurd_extreme_comparisons)]
9889        #[allow(unused_comparisons)]
9890        if __tmp.remaining() < Self::ENCODED_LEN {
9891            panic!(
9892                "buffer is too small (need {} bytes, but got {})",
9893                Self::ENCODED_LEN,
9894                __tmp.remaining(),
9895            )
9896        }
9897        __tmp.put_u32_le(self.size);
9898        __tmp.put_u16_le(self.width);
9899        __tmp.put_u16_le(self.height);
9900        __tmp.put_u16_le(self.packets);
9901        __tmp.put_u8(self.mavtype as u8);
9902        __tmp.put_u8(self.payload);
9903        __tmp.put_u8(self.jpg_quality);
9904        if matches!(version, MavlinkVersion::V2) {
9905            let len = __tmp.len();
9906            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9907        } else {
9908            __tmp.len()
9909        }
9910    }
9911}
9912#[doc = "id: 254"]
9913#[doc = "Send a debug value. The index is used to discriminate between values. These values show up in the plot of QGroundControl as DEBUG N."]
9914#[derive(Debug, Clone, PartialEq)]
9915#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9916#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9917pub struct DEBUG_DATA {
9918    #[doc = "Timestamp (time since system boot)."]
9919    pub time_boot_ms: u32,
9920    #[doc = "DEBUG value"]
9921    pub value: f32,
9922    #[doc = "index of debug variable"]
9923    pub ind: u8,
9924}
9925impl DEBUG_DATA {
9926    pub const ENCODED_LEN: usize = 9usize;
9927    pub const DEFAULT: Self = Self {
9928        time_boot_ms: 0_u32,
9929        value: 0.0_f32,
9930        ind: 0_u8,
9931    };
9932    #[cfg(feature = "arbitrary")]
9933    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
9934        use arbitrary::{Arbitrary, Unstructured};
9935        let mut buf = [0u8; 1024];
9936        rng.fill_bytes(&mut buf);
9937        let mut unstructured = Unstructured::new(&buf);
9938        Self::arbitrary(&mut unstructured).unwrap_or_default()
9939    }
9940}
9941impl Default for DEBUG_DATA {
9942    fn default() -> Self {
9943        Self::DEFAULT.clone()
9944    }
9945}
9946impl MessageData for DEBUG_DATA {
9947    type Message = MavMessage;
9948    const ID: u32 = 254u32;
9949    const NAME: &'static str = "DEBUG";
9950    const EXTRA_CRC: u8 = 46u8;
9951    const ENCODED_LEN: usize = 9usize;
9952    fn deser(
9953        _version: MavlinkVersion,
9954        __input: &[u8],
9955    ) -> Result<Self, ::mavlink_core::error::ParserError> {
9956        let avail_len = __input.len();
9957        let mut payload_buf = [0; Self::ENCODED_LEN];
9958        let mut buf = if avail_len < Self::ENCODED_LEN {
9959            payload_buf[0..avail_len].copy_from_slice(__input);
9960            Bytes::new(&payload_buf)
9961        } else {
9962            Bytes::new(__input)
9963        };
9964        let mut __struct = Self::default();
9965        __struct.time_boot_ms = buf.get_u32_le();
9966        __struct.value = buf.get_f32_le();
9967        __struct.ind = buf.get_u8();
9968        Ok(__struct)
9969    }
9970    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
9971        let mut __tmp = BytesMut::new(bytes);
9972        #[allow(clippy::absurd_extreme_comparisons)]
9973        #[allow(unused_comparisons)]
9974        if __tmp.remaining() < Self::ENCODED_LEN {
9975            panic!(
9976                "buffer is too small (need {} bytes, but got {})",
9977                Self::ENCODED_LEN,
9978                __tmp.remaining(),
9979            )
9980        }
9981        __tmp.put_u32_le(self.time_boot_ms);
9982        __tmp.put_f32_le(self.value);
9983        __tmp.put_u8(self.ind);
9984        if matches!(version, MavlinkVersion::V2) {
9985            let len = __tmp.len();
9986            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
9987        } else {
9988            __tmp.len()
9989        }
9990    }
9991}
9992#[doc = "id: 350"]
9993#[doc = "Large debug/prototyping array. The message uses the maximum available payload for data. The array_id and name fields are used to discriminate between messages in code and in user interfaces (respectively). Do not use in production code."]
9994#[derive(Debug, Clone, PartialEq)]
9995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
9996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
9997pub struct DEBUG_FLOAT_ARRAY_DATA {
9998    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
9999    pub time_usec: u64,
10000    #[doc = "Unique ID used to discriminate between arrays"]
10001    pub array_id: u16,
10002    #[doc = "Name, for human-friendly display in a Ground Control Station"]
10003    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10004    pub name: [u8; 10],
10005    #[doc = "data"]
10006    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10007    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10008    pub data: [f32; 58],
10009}
10010impl DEBUG_FLOAT_ARRAY_DATA {
10011    pub const ENCODED_LEN: usize = 252usize;
10012    pub const DEFAULT: Self = Self {
10013        time_usec: 0_u64,
10014        array_id: 0_u16,
10015        name: [0_u8; 10usize],
10016        data: [0.0_f32; 58usize],
10017    };
10018    #[cfg(feature = "arbitrary")]
10019    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10020        use arbitrary::{Arbitrary, Unstructured};
10021        let mut buf = [0u8; 1024];
10022        rng.fill_bytes(&mut buf);
10023        let mut unstructured = Unstructured::new(&buf);
10024        Self::arbitrary(&mut unstructured).unwrap_or_default()
10025    }
10026}
10027impl Default for DEBUG_FLOAT_ARRAY_DATA {
10028    fn default() -> Self {
10029        Self::DEFAULT.clone()
10030    }
10031}
10032impl MessageData for DEBUG_FLOAT_ARRAY_DATA {
10033    type Message = MavMessage;
10034    const ID: u32 = 350u32;
10035    const NAME: &'static str = "DEBUG_FLOAT_ARRAY";
10036    const EXTRA_CRC: u8 = 232u8;
10037    const ENCODED_LEN: usize = 252usize;
10038    fn deser(
10039        _version: MavlinkVersion,
10040        __input: &[u8],
10041    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10042        let avail_len = __input.len();
10043        let mut payload_buf = [0; Self::ENCODED_LEN];
10044        let mut buf = if avail_len < Self::ENCODED_LEN {
10045            payload_buf[0..avail_len].copy_from_slice(__input);
10046            Bytes::new(&payload_buf)
10047        } else {
10048            Bytes::new(__input)
10049        };
10050        let mut __struct = Self::default();
10051        __struct.time_usec = buf.get_u64_le();
10052        __struct.array_id = buf.get_u16_le();
10053        for v in &mut __struct.name {
10054            let val = buf.get_u8();
10055            *v = val;
10056        }
10057        for v in &mut __struct.data {
10058            let val = buf.get_f32_le();
10059            *v = val;
10060        }
10061        Ok(__struct)
10062    }
10063    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10064        let mut __tmp = BytesMut::new(bytes);
10065        #[allow(clippy::absurd_extreme_comparisons)]
10066        #[allow(unused_comparisons)]
10067        if __tmp.remaining() < Self::ENCODED_LEN {
10068            panic!(
10069                "buffer is too small (need {} bytes, but got {})",
10070                Self::ENCODED_LEN,
10071                __tmp.remaining(),
10072            )
10073        }
10074        __tmp.put_u64_le(self.time_usec);
10075        __tmp.put_u16_le(self.array_id);
10076        for val in &self.name {
10077            __tmp.put_u8(*val);
10078        }
10079        for val in &self.data {
10080            __tmp.put_f32_le(*val);
10081        }
10082        if matches!(version, MavlinkVersion::V2) {
10083            let len = __tmp.len();
10084            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10085        } else {
10086            __tmp.len()
10087        }
10088    }
10089}
10090#[doc = "id: 250"]
10091#[doc = "To debug something using a named 3D vector."]
10092#[derive(Debug, Clone, PartialEq)]
10093#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10094#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10095pub struct DEBUG_VECT_DATA {
10096    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10097    pub time_usec: u64,
10098    #[doc = "x"]
10099    pub x: f32,
10100    #[doc = "y"]
10101    pub y: f32,
10102    #[doc = "z"]
10103    pub z: f32,
10104    #[doc = "Name"]
10105    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10106    pub name: [u8; 10],
10107}
10108impl DEBUG_VECT_DATA {
10109    pub const ENCODED_LEN: usize = 30usize;
10110    pub const DEFAULT: Self = Self {
10111        time_usec: 0_u64,
10112        x: 0.0_f32,
10113        y: 0.0_f32,
10114        z: 0.0_f32,
10115        name: [0_u8; 10usize],
10116    };
10117    #[cfg(feature = "arbitrary")]
10118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10119        use arbitrary::{Arbitrary, Unstructured};
10120        let mut buf = [0u8; 1024];
10121        rng.fill_bytes(&mut buf);
10122        let mut unstructured = Unstructured::new(&buf);
10123        Self::arbitrary(&mut unstructured).unwrap_or_default()
10124    }
10125}
10126impl Default for DEBUG_VECT_DATA {
10127    fn default() -> Self {
10128        Self::DEFAULT.clone()
10129    }
10130}
10131impl MessageData for DEBUG_VECT_DATA {
10132    type Message = MavMessage;
10133    const ID: u32 = 250u32;
10134    const NAME: &'static str = "DEBUG_VECT";
10135    const EXTRA_CRC: u8 = 49u8;
10136    const ENCODED_LEN: usize = 30usize;
10137    fn deser(
10138        _version: MavlinkVersion,
10139        __input: &[u8],
10140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10141        let avail_len = __input.len();
10142        let mut payload_buf = [0; Self::ENCODED_LEN];
10143        let mut buf = if avail_len < Self::ENCODED_LEN {
10144            payload_buf[0..avail_len].copy_from_slice(__input);
10145            Bytes::new(&payload_buf)
10146        } else {
10147            Bytes::new(__input)
10148        };
10149        let mut __struct = Self::default();
10150        __struct.time_usec = buf.get_u64_le();
10151        __struct.x = buf.get_f32_le();
10152        __struct.y = buf.get_f32_le();
10153        __struct.z = buf.get_f32_le();
10154        for v in &mut __struct.name {
10155            let val = buf.get_u8();
10156            *v = val;
10157        }
10158        Ok(__struct)
10159    }
10160    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10161        let mut __tmp = BytesMut::new(bytes);
10162        #[allow(clippy::absurd_extreme_comparisons)]
10163        #[allow(unused_comparisons)]
10164        if __tmp.remaining() < Self::ENCODED_LEN {
10165            panic!(
10166                "buffer is too small (need {} bytes, but got {})",
10167                Self::ENCODED_LEN,
10168                __tmp.remaining(),
10169            )
10170        }
10171        __tmp.put_u64_le(self.time_usec);
10172        __tmp.put_f32_le(self.x);
10173        __tmp.put_f32_le(self.y);
10174        __tmp.put_f32_le(self.z);
10175        for val in &self.name {
10176            __tmp.put_u8(*val);
10177        }
10178        if matches!(version, MavlinkVersion::V2) {
10179            let len = __tmp.len();
10180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10181        } else {
10182            __tmp.len()
10183        }
10184    }
10185}
10186#[doc = "id: 132"]
10187#[doc = "Distance sensor information for an onboard rangefinder."]
10188#[derive(Debug, Clone, PartialEq)]
10189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10191pub struct DISTANCE_SENSOR_DATA {
10192    #[doc = "Timestamp (time since system boot)."]
10193    pub time_boot_ms: u32,
10194    #[doc = "Minimum distance the sensor can measure"]
10195    pub min_distance: u16,
10196    #[doc = "Maximum distance the sensor can measure"]
10197    pub max_distance: u16,
10198    #[doc = "Current distance reading"]
10199    pub current_distance: u16,
10200    #[doc = "Type of distance sensor."]
10201    pub mavtype: MavDistanceSensor,
10202    #[doc = "Onboard ID of the sensor"]
10203    pub id: u8,
10204    #[doc = "Direction the sensor faces. downward-facing: ROTATION_PITCH_270, upward-facing: ROTATION_PITCH_90, backward-facing: ROTATION_PITCH_180, forward-facing: ROTATION_NONE, left-facing: ROTATION_YAW_90, right-facing: ROTATION_YAW_270"]
10205    pub orientation: MavSensorOrientation,
10206    #[doc = "Measurement variance. Max standard deviation is 6cm. UINT8_MAX if unknown."]
10207    pub covariance: u8,
10208    #[doc = "Horizontal Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10209    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10210    pub horizontal_fov: f32,
10211    #[doc = "Vertical Field of View (angle) where the distance measurement is valid and the field of view is known. Otherwise this is set to 0."]
10212    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10213    pub vertical_fov: f32,
10214    #[doc = "Quaternion of the sensor orientation in vehicle body frame (w, x, y, z order, zero-rotation is 1, 0, 0, 0). Zero-rotation is along the vehicle body x-axis. This field is required if the orientation is set to MAV_SENSOR_ROTATION_CUSTOM. Set it to 0 if invalid.\""]
10215    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10216    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10217    pub quaternion: [f32; 4],
10218    #[doc = "Signal quality of the sensor. Specific to each sensor type, representing the relation of the signal strength with the target reflectivity, distance, size or aspect, but normalised as a percentage. 0 = unknown/unset signal quality, 1 = invalid signal, 100 = perfect signal."]
10219    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10220    pub signal_quality: u8,
10221}
10222impl DISTANCE_SENSOR_DATA {
10223    pub const ENCODED_LEN: usize = 39usize;
10224    pub const DEFAULT: Self = Self {
10225        time_boot_ms: 0_u32,
10226        min_distance: 0_u16,
10227        max_distance: 0_u16,
10228        current_distance: 0_u16,
10229        mavtype: MavDistanceSensor::DEFAULT,
10230        id: 0_u8,
10231        orientation: MavSensorOrientation::DEFAULT,
10232        covariance: 0_u8,
10233        horizontal_fov: 0.0_f32,
10234        vertical_fov: 0.0_f32,
10235        quaternion: [0.0_f32; 4usize],
10236        signal_quality: 0_u8,
10237    };
10238    #[cfg(feature = "arbitrary")]
10239    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10240        use arbitrary::{Arbitrary, Unstructured};
10241        let mut buf = [0u8; 1024];
10242        rng.fill_bytes(&mut buf);
10243        let mut unstructured = Unstructured::new(&buf);
10244        Self::arbitrary(&mut unstructured).unwrap_or_default()
10245    }
10246}
10247impl Default for DISTANCE_SENSOR_DATA {
10248    fn default() -> Self {
10249        Self::DEFAULT.clone()
10250    }
10251}
10252impl MessageData for DISTANCE_SENSOR_DATA {
10253    type Message = MavMessage;
10254    const ID: u32 = 132u32;
10255    const NAME: &'static str = "DISTANCE_SENSOR";
10256    const EXTRA_CRC: u8 = 85u8;
10257    const ENCODED_LEN: usize = 39usize;
10258    fn deser(
10259        _version: MavlinkVersion,
10260        __input: &[u8],
10261    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10262        let avail_len = __input.len();
10263        let mut payload_buf = [0; Self::ENCODED_LEN];
10264        let mut buf = if avail_len < Self::ENCODED_LEN {
10265            payload_buf[0..avail_len].copy_from_slice(__input);
10266            Bytes::new(&payload_buf)
10267        } else {
10268            Bytes::new(__input)
10269        };
10270        let mut __struct = Self::default();
10271        __struct.time_boot_ms = buf.get_u32_le();
10272        __struct.min_distance = buf.get_u16_le();
10273        __struct.max_distance = buf.get_u16_le();
10274        __struct.current_distance = buf.get_u16_le();
10275        let tmp = buf.get_u8();
10276        __struct.mavtype =
10277            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10278                enum_type: "MavDistanceSensor",
10279                value: tmp as u32,
10280            })?;
10281        __struct.id = buf.get_u8();
10282        let tmp = buf.get_u8();
10283        __struct.orientation =
10284            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10285                enum_type: "MavSensorOrientation",
10286                value: tmp as u32,
10287            })?;
10288        __struct.covariance = buf.get_u8();
10289        __struct.horizontal_fov = buf.get_f32_le();
10290        __struct.vertical_fov = buf.get_f32_le();
10291        for v in &mut __struct.quaternion {
10292            let val = buf.get_f32_le();
10293            *v = val;
10294        }
10295        __struct.signal_quality = buf.get_u8();
10296        Ok(__struct)
10297    }
10298    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10299        let mut __tmp = BytesMut::new(bytes);
10300        #[allow(clippy::absurd_extreme_comparisons)]
10301        #[allow(unused_comparisons)]
10302        if __tmp.remaining() < Self::ENCODED_LEN {
10303            panic!(
10304                "buffer is too small (need {} bytes, but got {})",
10305                Self::ENCODED_LEN,
10306                __tmp.remaining(),
10307            )
10308        }
10309        __tmp.put_u32_le(self.time_boot_ms);
10310        __tmp.put_u16_le(self.min_distance);
10311        __tmp.put_u16_le(self.max_distance);
10312        __tmp.put_u16_le(self.current_distance);
10313        __tmp.put_u8(self.mavtype as u8);
10314        __tmp.put_u8(self.id);
10315        __tmp.put_u8(self.orientation as u8);
10316        __tmp.put_u8(self.covariance);
10317        __tmp.put_f32_le(self.horizontal_fov);
10318        __tmp.put_f32_le(self.vertical_fov);
10319        for val in &self.quaternion {
10320            __tmp.put_f32_le(*val);
10321        }
10322        __tmp.put_u8(self.signal_quality);
10323        if matches!(version, MavlinkVersion::V2) {
10324            let len = __tmp.len();
10325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10326        } else {
10327            __tmp.len()
10328        }
10329    }
10330}
10331#[doc = "id: 225"]
10332#[doc = "EFI status output."]
10333#[derive(Debug, Clone, PartialEq)]
10334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10336pub struct EFI_STATUS_DATA {
10337    #[doc = "ECU index"]
10338    pub ecu_index: f32,
10339    #[doc = "RPM"]
10340    pub rpm: f32,
10341    #[doc = "Fuel consumed"]
10342    pub fuel_consumed: f32,
10343    #[doc = "Fuel flow rate"]
10344    pub fuel_flow: f32,
10345    #[doc = "Engine load"]
10346    pub engine_load: f32,
10347    #[doc = "Throttle position"]
10348    pub throttle_position: f32,
10349    #[doc = "Spark dwell time"]
10350    pub spark_dwell_time: f32,
10351    #[doc = "Barometric pressure"]
10352    pub barometric_pressure: f32,
10353    #[doc = "Intake manifold pressure("]
10354    pub intake_manifold_pressure: f32,
10355    #[doc = "Intake manifold temperature"]
10356    pub intake_manifold_temperature: f32,
10357    #[doc = "Cylinder head temperature"]
10358    pub cylinder_head_temperature: f32,
10359    #[doc = "Ignition timing (Crank angle degrees)"]
10360    pub ignition_timing: f32,
10361    #[doc = "Injection time"]
10362    pub injection_time: f32,
10363    #[doc = "Exhaust gas temperature"]
10364    pub exhaust_gas_temperature: f32,
10365    #[doc = "Output throttle"]
10366    pub throttle_out: f32,
10367    #[doc = "Pressure/temperature compensation"]
10368    pub pt_compensation: f32,
10369    #[doc = "EFI health status"]
10370    pub health: u8,
10371    #[doc = "Supply voltage to EFI sparking system.  Zero in this value means \"unknown\", so if the supply voltage really is zero volts use 0.0001 instead."]
10372    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10373    pub ignition_voltage: f32,
10374    #[doc = "Fuel pressure. Zero in this value means \"unknown\", so if the fuel pressure really is zero kPa use 0.0001 instead."]
10375    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
10376    pub fuel_pressure: f32,
10377}
10378impl EFI_STATUS_DATA {
10379    pub const ENCODED_LEN: usize = 73usize;
10380    pub const DEFAULT: Self = Self {
10381        ecu_index: 0.0_f32,
10382        rpm: 0.0_f32,
10383        fuel_consumed: 0.0_f32,
10384        fuel_flow: 0.0_f32,
10385        engine_load: 0.0_f32,
10386        throttle_position: 0.0_f32,
10387        spark_dwell_time: 0.0_f32,
10388        barometric_pressure: 0.0_f32,
10389        intake_manifold_pressure: 0.0_f32,
10390        intake_manifold_temperature: 0.0_f32,
10391        cylinder_head_temperature: 0.0_f32,
10392        ignition_timing: 0.0_f32,
10393        injection_time: 0.0_f32,
10394        exhaust_gas_temperature: 0.0_f32,
10395        throttle_out: 0.0_f32,
10396        pt_compensation: 0.0_f32,
10397        health: 0_u8,
10398        ignition_voltage: 0.0_f32,
10399        fuel_pressure: 0.0_f32,
10400    };
10401    #[cfg(feature = "arbitrary")]
10402    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10403        use arbitrary::{Arbitrary, Unstructured};
10404        let mut buf = [0u8; 1024];
10405        rng.fill_bytes(&mut buf);
10406        let mut unstructured = Unstructured::new(&buf);
10407        Self::arbitrary(&mut unstructured).unwrap_or_default()
10408    }
10409}
10410impl Default for EFI_STATUS_DATA {
10411    fn default() -> Self {
10412        Self::DEFAULT.clone()
10413    }
10414}
10415impl MessageData for EFI_STATUS_DATA {
10416    type Message = MavMessage;
10417    const ID: u32 = 225u32;
10418    const NAME: &'static str = "EFI_STATUS";
10419    const EXTRA_CRC: u8 = 208u8;
10420    const ENCODED_LEN: usize = 73usize;
10421    fn deser(
10422        _version: MavlinkVersion,
10423        __input: &[u8],
10424    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10425        let avail_len = __input.len();
10426        let mut payload_buf = [0; Self::ENCODED_LEN];
10427        let mut buf = if avail_len < Self::ENCODED_LEN {
10428            payload_buf[0..avail_len].copy_from_slice(__input);
10429            Bytes::new(&payload_buf)
10430        } else {
10431            Bytes::new(__input)
10432        };
10433        let mut __struct = Self::default();
10434        __struct.ecu_index = buf.get_f32_le();
10435        __struct.rpm = buf.get_f32_le();
10436        __struct.fuel_consumed = buf.get_f32_le();
10437        __struct.fuel_flow = buf.get_f32_le();
10438        __struct.engine_load = buf.get_f32_le();
10439        __struct.throttle_position = buf.get_f32_le();
10440        __struct.spark_dwell_time = buf.get_f32_le();
10441        __struct.barometric_pressure = buf.get_f32_le();
10442        __struct.intake_manifold_pressure = buf.get_f32_le();
10443        __struct.intake_manifold_temperature = buf.get_f32_le();
10444        __struct.cylinder_head_temperature = buf.get_f32_le();
10445        __struct.ignition_timing = buf.get_f32_le();
10446        __struct.injection_time = buf.get_f32_le();
10447        __struct.exhaust_gas_temperature = buf.get_f32_le();
10448        __struct.throttle_out = buf.get_f32_le();
10449        __struct.pt_compensation = buf.get_f32_le();
10450        __struct.health = buf.get_u8();
10451        __struct.ignition_voltage = buf.get_f32_le();
10452        __struct.fuel_pressure = buf.get_f32_le();
10453        Ok(__struct)
10454    }
10455    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10456        let mut __tmp = BytesMut::new(bytes);
10457        #[allow(clippy::absurd_extreme_comparisons)]
10458        #[allow(unused_comparisons)]
10459        if __tmp.remaining() < Self::ENCODED_LEN {
10460            panic!(
10461                "buffer is too small (need {} bytes, but got {})",
10462                Self::ENCODED_LEN,
10463                __tmp.remaining(),
10464            )
10465        }
10466        __tmp.put_f32_le(self.ecu_index);
10467        __tmp.put_f32_le(self.rpm);
10468        __tmp.put_f32_le(self.fuel_consumed);
10469        __tmp.put_f32_le(self.fuel_flow);
10470        __tmp.put_f32_le(self.engine_load);
10471        __tmp.put_f32_le(self.throttle_position);
10472        __tmp.put_f32_le(self.spark_dwell_time);
10473        __tmp.put_f32_le(self.barometric_pressure);
10474        __tmp.put_f32_le(self.intake_manifold_pressure);
10475        __tmp.put_f32_le(self.intake_manifold_temperature);
10476        __tmp.put_f32_le(self.cylinder_head_temperature);
10477        __tmp.put_f32_le(self.ignition_timing);
10478        __tmp.put_f32_le(self.injection_time);
10479        __tmp.put_f32_le(self.exhaust_gas_temperature);
10480        __tmp.put_f32_le(self.throttle_out);
10481        __tmp.put_f32_le(self.pt_compensation);
10482        __tmp.put_u8(self.health);
10483        __tmp.put_f32_le(self.ignition_voltage);
10484        __tmp.put_f32_le(self.fuel_pressure);
10485        if matches!(version, MavlinkVersion::V2) {
10486            let len = __tmp.len();
10487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10488        } else {
10489            __tmp.len()
10490        }
10491    }
10492}
10493#[doc = "id: 131"]
10494#[doc = "Data packet for images sent using the Image Transmission Protocol: <https://mavlink.io/en/services/image_transmission.html>."]
10495#[derive(Debug, Clone, PartialEq)]
10496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10498pub struct ENCAPSULATED_DATA_DATA {
10499    #[doc = "sequence number (starting with 0 on every transmission)"]
10500    pub seqnr: u16,
10501    #[doc = "image data bytes"]
10502    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10503    pub data: [u8; 253],
10504}
10505impl ENCAPSULATED_DATA_DATA {
10506    pub const ENCODED_LEN: usize = 255usize;
10507    pub const DEFAULT: Self = Self {
10508        seqnr: 0_u16,
10509        data: [0_u8; 253usize],
10510    };
10511    #[cfg(feature = "arbitrary")]
10512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10513        use arbitrary::{Arbitrary, Unstructured};
10514        let mut buf = [0u8; 1024];
10515        rng.fill_bytes(&mut buf);
10516        let mut unstructured = Unstructured::new(&buf);
10517        Self::arbitrary(&mut unstructured).unwrap_or_default()
10518    }
10519}
10520impl Default for ENCAPSULATED_DATA_DATA {
10521    fn default() -> Self {
10522        Self::DEFAULT.clone()
10523    }
10524}
10525impl MessageData for ENCAPSULATED_DATA_DATA {
10526    type Message = MavMessage;
10527    const ID: u32 = 131u32;
10528    const NAME: &'static str = "ENCAPSULATED_DATA";
10529    const EXTRA_CRC: u8 = 223u8;
10530    const ENCODED_LEN: usize = 255usize;
10531    fn deser(
10532        _version: MavlinkVersion,
10533        __input: &[u8],
10534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10535        let avail_len = __input.len();
10536        let mut payload_buf = [0; Self::ENCODED_LEN];
10537        let mut buf = if avail_len < Self::ENCODED_LEN {
10538            payload_buf[0..avail_len].copy_from_slice(__input);
10539            Bytes::new(&payload_buf)
10540        } else {
10541            Bytes::new(__input)
10542        };
10543        let mut __struct = Self::default();
10544        __struct.seqnr = buf.get_u16_le();
10545        for v in &mut __struct.data {
10546            let val = buf.get_u8();
10547            *v = val;
10548        }
10549        Ok(__struct)
10550    }
10551    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10552        let mut __tmp = BytesMut::new(bytes);
10553        #[allow(clippy::absurd_extreme_comparisons)]
10554        #[allow(unused_comparisons)]
10555        if __tmp.remaining() < Self::ENCODED_LEN {
10556            panic!(
10557                "buffer is too small (need {} bytes, but got {})",
10558                Self::ENCODED_LEN,
10559                __tmp.remaining(),
10560            )
10561        }
10562        __tmp.put_u16_le(self.seqnr);
10563        for val in &self.data {
10564            __tmp.put_u8(*val);
10565        }
10566        if matches!(version, MavlinkVersion::V2) {
10567            let len = __tmp.len();
10568            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10569        } else {
10570            __tmp.len()
10571        }
10572    }
10573}
10574#[doc = "id: 290"]
10575#[doc = "ESC information for lower rate streaming. Recommended streaming rate 1Hz. See ESC_STATUS for higher-rate ESC data."]
10576#[derive(Debug, Clone, PartialEq)]
10577#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10578#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10579pub struct ESC_INFO_DATA {
10580    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10581    pub time_usec: u64,
10582    #[doc = "Number of reported errors by each ESC since boot."]
10583    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10584    pub error_count: [u32; 4],
10585    #[doc = "Counter of data packets received."]
10586    pub counter: u16,
10587    #[doc = "Bitmap of ESC failure flags."]
10588    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10589    pub failure_flags: [u16; 4],
10590    #[doc = "Temperature of each ESC. INT16_MAX: if data not supplied by ESC."]
10591    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10592    pub temperature: [i16; 4],
10593    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10594    pub index: u8,
10595    #[doc = "Total number of ESCs in all messages of this type. Message fields with an index higher than this should be ignored because they contain invalid data."]
10596    pub count: u8,
10597    #[doc = "Connection type protocol for all ESC."]
10598    pub connection_type: EscConnectionType,
10599    #[doc = "Information regarding online/offline status of each ESC."]
10600    pub info: u8,
10601}
10602impl ESC_INFO_DATA {
10603    pub const ENCODED_LEN: usize = 46usize;
10604    pub const DEFAULT: Self = Self {
10605        time_usec: 0_u64,
10606        error_count: [0_u32; 4usize],
10607        counter: 0_u16,
10608        failure_flags: [0_u16; 4usize],
10609        temperature: [0_i16; 4usize],
10610        index: 0_u8,
10611        count: 0_u8,
10612        connection_type: EscConnectionType::DEFAULT,
10613        info: 0_u8,
10614    };
10615    #[cfg(feature = "arbitrary")]
10616    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10617        use arbitrary::{Arbitrary, Unstructured};
10618        let mut buf = [0u8; 1024];
10619        rng.fill_bytes(&mut buf);
10620        let mut unstructured = Unstructured::new(&buf);
10621        Self::arbitrary(&mut unstructured).unwrap_or_default()
10622    }
10623}
10624impl Default for ESC_INFO_DATA {
10625    fn default() -> Self {
10626        Self::DEFAULT.clone()
10627    }
10628}
10629impl MessageData for ESC_INFO_DATA {
10630    type Message = MavMessage;
10631    const ID: u32 = 290u32;
10632    const NAME: &'static str = "ESC_INFO";
10633    const EXTRA_CRC: u8 = 251u8;
10634    const ENCODED_LEN: usize = 46usize;
10635    fn deser(
10636        _version: MavlinkVersion,
10637        __input: &[u8],
10638    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10639        let avail_len = __input.len();
10640        let mut payload_buf = [0; Self::ENCODED_LEN];
10641        let mut buf = if avail_len < Self::ENCODED_LEN {
10642            payload_buf[0..avail_len].copy_from_slice(__input);
10643            Bytes::new(&payload_buf)
10644        } else {
10645            Bytes::new(__input)
10646        };
10647        let mut __struct = Self::default();
10648        __struct.time_usec = buf.get_u64_le();
10649        for v in &mut __struct.error_count {
10650            let val = buf.get_u32_le();
10651            *v = val;
10652        }
10653        __struct.counter = buf.get_u16_le();
10654        for v in &mut __struct.failure_flags {
10655            let val = buf.get_u16_le();
10656            *v = val;
10657        }
10658        for v in &mut __struct.temperature {
10659            let val = buf.get_i16_le();
10660            *v = val;
10661        }
10662        __struct.index = buf.get_u8();
10663        __struct.count = buf.get_u8();
10664        let tmp = buf.get_u8();
10665        __struct.connection_type =
10666            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
10667                enum_type: "EscConnectionType",
10668                value: tmp as u32,
10669            })?;
10670        __struct.info = buf.get_u8();
10671        Ok(__struct)
10672    }
10673    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10674        let mut __tmp = BytesMut::new(bytes);
10675        #[allow(clippy::absurd_extreme_comparisons)]
10676        #[allow(unused_comparisons)]
10677        if __tmp.remaining() < Self::ENCODED_LEN {
10678            panic!(
10679                "buffer is too small (need {} bytes, but got {})",
10680                Self::ENCODED_LEN,
10681                __tmp.remaining(),
10682            )
10683        }
10684        __tmp.put_u64_le(self.time_usec);
10685        for val in &self.error_count {
10686            __tmp.put_u32_le(*val);
10687        }
10688        __tmp.put_u16_le(self.counter);
10689        for val in &self.failure_flags {
10690            __tmp.put_u16_le(*val);
10691        }
10692        for val in &self.temperature {
10693            __tmp.put_i16_le(*val);
10694        }
10695        __tmp.put_u8(self.index);
10696        __tmp.put_u8(self.count);
10697        __tmp.put_u8(self.connection_type as u8);
10698        __tmp.put_u8(self.info);
10699        if matches!(version, MavlinkVersion::V2) {
10700            let len = __tmp.len();
10701            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10702        } else {
10703            __tmp.len()
10704        }
10705    }
10706}
10707#[doc = "id: 291"]
10708#[doc = "ESC information for higher rate streaming. Recommended streaming rate is ~10 Hz. Information that changes more slowly is sent in ESC_INFO. It should typically only be streamed on high-bandwidth links (i.e. to a companion computer)."]
10709#[derive(Debug, Clone, PartialEq)]
10710#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10711#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10712pub struct ESC_STATUS_DATA {
10713    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude the number."]
10714    pub time_usec: u64,
10715    #[doc = "Reported motor RPM from each ESC (negative for reverse rotation)."]
10716    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10717    pub rpm: [i32; 4],
10718    #[doc = "Voltage measured from each ESC."]
10719    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10720    pub voltage: [f32; 4],
10721    #[doc = "Current measured from each ESC."]
10722    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10723    pub current: [f32; 4],
10724    #[doc = "Index of the first ESC in this message. minValue = 0, maxValue = 60, increment = 4."]
10725    pub index: u8,
10726}
10727impl ESC_STATUS_DATA {
10728    pub const ENCODED_LEN: usize = 57usize;
10729    pub const DEFAULT: Self = Self {
10730        time_usec: 0_u64,
10731        rpm: [0_i32; 4usize],
10732        voltage: [0.0_f32; 4usize],
10733        current: [0.0_f32; 4usize],
10734        index: 0_u8,
10735    };
10736    #[cfg(feature = "arbitrary")]
10737    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10738        use arbitrary::{Arbitrary, Unstructured};
10739        let mut buf = [0u8; 1024];
10740        rng.fill_bytes(&mut buf);
10741        let mut unstructured = Unstructured::new(&buf);
10742        Self::arbitrary(&mut unstructured).unwrap_or_default()
10743    }
10744}
10745impl Default for ESC_STATUS_DATA {
10746    fn default() -> Self {
10747        Self::DEFAULT.clone()
10748    }
10749}
10750impl MessageData for ESC_STATUS_DATA {
10751    type Message = MavMessage;
10752    const ID: u32 = 291u32;
10753    const NAME: &'static str = "ESC_STATUS";
10754    const EXTRA_CRC: u8 = 10u8;
10755    const ENCODED_LEN: usize = 57usize;
10756    fn deser(
10757        _version: MavlinkVersion,
10758        __input: &[u8],
10759    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10760        let avail_len = __input.len();
10761        let mut payload_buf = [0; Self::ENCODED_LEN];
10762        let mut buf = if avail_len < Self::ENCODED_LEN {
10763            payload_buf[0..avail_len].copy_from_slice(__input);
10764            Bytes::new(&payload_buf)
10765        } else {
10766            Bytes::new(__input)
10767        };
10768        let mut __struct = Self::default();
10769        __struct.time_usec = buf.get_u64_le();
10770        for v in &mut __struct.rpm {
10771            let val = buf.get_i32_le();
10772            *v = val;
10773        }
10774        for v in &mut __struct.voltage {
10775            let val = buf.get_f32_le();
10776            *v = val;
10777        }
10778        for v in &mut __struct.current {
10779            let val = buf.get_f32_le();
10780            *v = val;
10781        }
10782        __struct.index = buf.get_u8();
10783        Ok(__struct)
10784    }
10785    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10786        let mut __tmp = BytesMut::new(bytes);
10787        #[allow(clippy::absurd_extreme_comparisons)]
10788        #[allow(unused_comparisons)]
10789        if __tmp.remaining() < Self::ENCODED_LEN {
10790            panic!(
10791                "buffer is too small (need {} bytes, but got {})",
10792                Self::ENCODED_LEN,
10793                __tmp.remaining(),
10794            )
10795        }
10796        __tmp.put_u64_le(self.time_usec);
10797        for val in &self.rpm {
10798            __tmp.put_i32_le(*val);
10799        }
10800        for val in &self.voltage {
10801            __tmp.put_f32_le(*val);
10802        }
10803        for val in &self.current {
10804            __tmp.put_f32_le(*val);
10805        }
10806        __tmp.put_u8(self.index);
10807        if matches!(version, MavlinkVersion::V2) {
10808            let len = __tmp.len();
10809            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10810        } else {
10811            __tmp.len()
10812        }
10813    }
10814}
10815#[doc = "id: 230"]
10816#[doc = "Estimator status message including flags, innovation test ratios and estimated accuracies. The flags message is an integer bitmask containing information on which EKF outputs are valid. See the ESTIMATOR_STATUS_FLAGS enum definition for further information. The innovation test ratios show the magnitude of the sensor innovation divided by the innovation check threshold. Under normal operation the innovation test ratios should be below 0.5 with occasional values up to 1.0. Values greater than 1.0 should be rare under normal operation and indicate that a measurement has been rejected by the filter. The user should be notified if an innovation test ratio greater than 1.0 is recorded. Notifications for values in the range between 0.5 and 1.0 should be optional and controllable by the user."]
10817#[derive(Debug, Clone, PartialEq)]
10818#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10819#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10820pub struct ESTIMATOR_STATUS_DATA {
10821    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
10822    pub time_usec: u64,
10823    #[doc = "Velocity innovation test ratio"]
10824    pub vel_ratio: f32,
10825    #[doc = "Horizontal position innovation test ratio"]
10826    pub pos_horiz_ratio: f32,
10827    #[doc = "Vertical position innovation test ratio"]
10828    pub pos_vert_ratio: f32,
10829    #[doc = "Magnetometer innovation test ratio"]
10830    pub mag_ratio: f32,
10831    #[doc = "Height above terrain innovation test ratio"]
10832    pub hagl_ratio: f32,
10833    #[doc = "True airspeed innovation test ratio"]
10834    pub tas_ratio: f32,
10835    #[doc = "Horizontal position 1-STD accuracy relative to the EKF local origin"]
10836    pub pos_horiz_accuracy: f32,
10837    #[doc = "Vertical position 1-STD accuracy relative to the EKF local origin"]
10838    pub pos_vert_accuracy: f32,
10839    #[doc = "Bitmap indicating which EKF outputs are valid."]
10840    pub flags: EstimatorStatusFlags,
10841}
10842impl ESTIMATOR_STATUS_DATA {
10843    pub const ENCODED_LEN: usize = 42usize;
10844    pub const DEFAULT: Self = Self {
10845        time_usec: 0_u64,
10846        vel_ratio: 0.0_f32,
10847        pos_horiz_ratio: 0.0_f32,
10848        pos_vert_ratio: 0.0_f32,
10849        mag_ratio: 0.0_f32,
10850        hagl_ratio: 0.0_f32,
10851        tas_ratio: 0.0_f32,
10852        pos_horiz_accuracy: 0.0_f32,
10853        pos_vert_accuracy: 0.0_f32,
10854        flags: EstimatorStatusFlags::DEFAULT,
10855    };
10856    #[cfg(feature = "arbitrary")]
10857    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10858        use arbitrary::{Arbitrary, Unstructured};
10859        let mut buf = [0u8; 1024];
10860        rng.fill_bytes(&mut buf);
10861        let mut unstructured = Unstructured::new(&buf);
10862        Self::arbitrary(&mut unstructured).unwrap_or_default()
10863    }
10864}
10865impl Default for ESTIMATOR_STATUS_DATA {
10866    fn default() -> Self {
10867        Self::DEFAULT.clone()
10868    }
10869}
10870impl MessageData for ESTIMATOR_STATUS_DATA {
10871    type Message = MavMessage;
10872    const ID: u32 = 230u32;
10873    const NAME: &'static str = "ESTIMATOR_STATUS";
10874    const EXTRA_CRC: u8 = 163u8;
10875    const ENCODED_LEN: usize = 42usize;
10876    fn deser(
10877        _version: MavlinkVersion,
10878        __input: &[u8],
10879    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10880        let avail_len = __input.len();
10881        let mut payload_buf = [0; Self::ENCODED_LEN];
10882        let mut buf = if avail_len < Self::ENCODED_LEN {
10883            payload_buf[0..avail_len].copy_from_slice(__input);
10884            Bytes::new(&payload_buf)
10885        } else {
10886            Bytes::new(__input)
10887        };
10888        let mut __struct = Self::default();
10889        __struct.time_usec = buf.get_u64_le();
10890        __struct.vel_ratio = buf.get_f32_le();
10891        __struct.pos_horiz_ratio = buf.get_f32_le();
10892        __struct.pos_vert_ratio = buf.get_f32_le();
10893        __struct.mag_ratio = buf.get_f32_le();
10894        __struct.hagl_ratio = buf.get_f32_le();
10895        __struct.tas_ratio = buf.get_f32_le();
10896        __struct.pos_horiz_accuracy = buf.get_f32_le();
10897        __struct.pos_vert_accuracy = buf.get_f32_le();
10898        let tmp = buf.get_u16_le();
10899        __struct.flags = EstimatorStatusFlags::from_bits(tmp & EstimatorStatusFlags::all().bits())
10900            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
10901                flag_type: "EstimatorStatusFlags",
10902                value: tmp as u32,
10903            })?;
10904        Ok(__struct)
10905    }
10906    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
10907        let mut __tmp = BytesMut::new(bytes);
10908        #[allow(clippy::absurd_extreme_comparisons)]
10909        #[allow(unused_comparisons)]
10910        if __tmp.remaining() < Self::ENCODED_LEN {
10911            panic!(
10912                "buffer is too small (need {} bytes, but got {})",
10913                Self::ENCODED_LEN,
10914                __tmp.remaining(),
10915            )
10916        }
10917        __tmp.put_u64_le(self.time_usec);
10918        __tmp.put_f32_le(self.vel_ratio);
10919        __tmp.put_f32_le(self.pos_horiz_ratio);
10920        __tmp.put_f32_le(self.pos_vert_ratio);
10921        __tmp.put_f32_le(self.mag_ratio);
10922        __tmp.put_f32_le(self.hagl_ratio);
10923        __tmp.put_f32_le(self.tas_ratio);
10924        __tmp.put_f32_le(self.pos_horiz_accuracy);
10925        __tmp.put_f32_le(self.pos_vert_accuracy);
10926        __tmp.put_u16_le(self.flags.bits());
10927        if matches!(version, MavlinkVersion::V2) {
10928            let len = __tmp.len();
10929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
10930        } else {
10931            __tmp.len()
10932        }
10933    }
10934}
10935#[doc = "id: 410"]
10936#[doc = "Event message. Each new event from a particular component gets a new sequence number. The same message might be sent multiple times if (re-)requested. Most events are broadcast, some can be specific to a target component (as receivers keep track of the sequence for missed events, all events need to be broadcast. Thus we use destination_component instead of target_component)."]
10937#[derive(Debug, Clone, PartialEq)]
10938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
10939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
10940pub struct EVENT_DATA {
10941    #[doc = "Event ID (as defined in the component metadata)"]
10942    pub id: u32,
10943    #[doc = "Timestamp (time since system boot when the event happened)."]
10944    pub event_time_boot_ms: u32,
10945    #[doc = "Sequence number."]
10946    pub sequence: u16,
10947    #[doc = "Component ID"]
10948    pub destination_component: u8,
10949    #[doc = "System ID"]
10950    pub destination_system: u8,
10951    #[doc = "Log levels: 4 bits MSB: internal (for logging purposes), 4 bits LSB: external. Levels: Emergency = 0, Alert = 1, Critical = 2, Error = 3, Warning = 4, Notice = 5, Info = 6, Debug = 7, Protocol = 8, Disabled = 9"]
10952    pub log_levels: u8,
10953    #[doc = "Arguments (depend on event ID)."]
10954    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
10955    pub arguments: [u8; 40],
10956}
10957impl EVENT_DATA {
10958    pub const ENCODED_LEN: usize = 53usize;
10959    pub const DEFAULT: Self = Self {
10960        id: 0_u32,
10961        event_time_boot_ms: 0_u32,
10962        sequence: 0_u16,
10963        destination_component: 0_u8,
10964        destination_system: 0_u8,
10965        log_levels: 0_u8,
10966        arguments: [0_u8; 40usize],
10967    };
10968    #[cfg(feature = "arbitrary")]
10969    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
10970        use arbitrary::{Arbitrary, Unstructured};
10971        let mut buf = [0u8; 1024];
10972        rng.fill_bytes(&mut buf);
10973        let mut unstructured = Unstructured::new(&buf);
10974        Self::arbitrary(&mut unstructured).unwrap_or_default()
10975    }
10976}
10977impl Default for EVENT_DATA {
10978    fn default() -> Self {
10979        Self::DEFAULT.clone()
10980    }
10981}
10982impl MessageData for EVENT_DATA {
10983    type Message = MavMessage;
10984    const ID: u32 = 410u32;
10985    const NAME: &'static str = "EVENT";
10986    const EXTRA_CRC: u8 = 160u8;
10987    const ENCODED_LEN: usize = 53usize;
10988    fn deser(
10989        _version: MavlinkVersion,
10990        __input: &[u8],
10991    ) -> Result<Self, ::mavlink_core::error::ParserError> {
10992        let avail_len = __input.len();
10993        let mut payload_buf = [0; Self::ENCODED_LEN];
10994        let mut buf = if avail_len < Self::ENCODED_LEN {
10995            payload_buf[0..avail_len].copy_from_slice(__input);
10996            Bytes::new(&payload_buf)
10997        } else {
10998            Bytes::new(__input)
10999        };
11000        let mut __struct = Self::default();
11001        __struct.id = buf.get_u32_le();
11002        __struct.event_time_boot_ms = buf.get_u32_le();
11003        __struct.sequence = buf.get_u16_le();
11004        __struct.destination_component = buf.get_u8();
11005        __struct.destination_system = buf.get_u8();
11006        __struct.log_levels = buf.get_u8();
11007        for v in &mut __struct.arguments {
11008            let val = buf.get_u8();
11009            *v = val;
11010        }
11011        Ok(__struct)
11012    }
11013    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11014        let mut __tmp = BytesMut::new(bytes);
11015        #[allow(clippy::absurd_extreme_comparisons)]
11016        #[allow(unused_comparisons)]
11017        if __tmp.remaining() < Self::ENCODED_LEN {
11018            panic!(
11019                "buffer is too small (need {} bytes, but got {})",
11020                Self::ENCODED_LEN,
11021                __tmp.remaining(),
11022            )
11023        }
11024        __tmp.put_u32_le(self.id);
11025        __tmp.put_u32_le(self.event_time_boot_ms);
11026        __tmp.put_u16_le(self.sequence);
11027        __tmp.put_u8(self.destination_component);
11028        __tmp.put_u8(self.destination_system);
11029        __tmp.put_u8(self.log_levels);
11030        for val in &self.arguments {
11031            __tmp.put_u8(*val);
11032        }
11033        if matches!(version, MavlinkVersion::V2) {
11034            let len = __tmp.len();
11035            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11036        } else {
11037            __tmp.len()
11038        }
11039    }
11040}
11041#[doc = "id: 245"]
11042#[doc = "Provides state for additional features."]
11043#[derive(Debug, Clone, PartialEq)]
11044#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11045#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11046pub struct EXTENDED_SYS_STATE_DATA {
11047    #[doc = "The VTOL state if applicable. Is set to MAV_VTOL_STATE_UNDEFINED if UAV is not in VTOL configuration."]
11048    pub vtol_state: MavVtolState,
11049    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
11050    pub landed_state: MavLandedState,
11051}
11052impl EXTENDED_SYS_STATE_DATA {
11053    pub const ENCODED_LEN: usize = 2usize;
11054    pub const DEFAULT: Self = Self {
11055        vtol_state: MavVtolState::DEFAULT,
11056        landed_state: MavLandedState::DEFAULT,
11057    };
11058    #[cfg(feature = "arbitrary")]
11059    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11060        use arbitrary::{Arbitrary, Unstructured};
11061        let mut buf = [0u8; 1024];
11062        rng.fill_bytes(&mut buf);
11063        let mut unstructured = Unstructured::new(&buf);
11064        Self::arbitrary(&mut unstructured).unwrap_or_default()
11065    }
11066}
11067impl Default for EXTENDED_SYS_STATE_DATA {
11068    fn default() -> Self {
11069        Self::DEFAULT.clone()
11070    }
11071}
11072impl MessageData for EXTENDED_SYS_STATE_DATA {
11073    type Message = MavMessage;
11074    const ID: u32 = 245u32;
11075    const NAME: &'static str = "EXTENDED_SYS_STATE";
11076    const EXTRA_CRC: u8 = 130u8;
11077    const ENCODED_LEN: usize = 2usize;
11078    fn deser(
11079        _version: MavlinkVersion,
11080        __input: &[u8],
11081    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11082        let avail_len = __input.len();
11083        let mut payload_buf = [0; Self::ENCODED_LEN];
11084        let mut buf = if avail_len < Self::ENCODED_LEN {
11085            payload_buf[0..avail_len].copy_from_slice(__input);
11086            Bytes::new(&payload_buf)
11087        } else {
11088            Bytes::new(__input)
11089        };
11090        let mut __struct = Self::default();
11091        let tmp = buf.get_u8();
11092        __struct.vtol_state =
11093            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11094                enum_type: "MavVtolState",
11095                value: tmp as u32,
11096            })?;
11097        let tmp = buf.get_u8();
11098        __struct.landed_state =
11099            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11100                enum_type: "MavLandedState",
11101                value: tmp as u32,
11102            })?;
11103        Ok(__struct)
11104    }
11105    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11106        let mut __tmp = BytesMut::new(bytes);
11107        #[allow(clippy::absurd_extreme_comparisons)]
11108        #[allow(unused_comparisons)]
11109        if __tmp.remaining() < Self::ENCODED_LEN {
11110            panic!(
11111                "buffer is too small (need {} bytes, but got {})",
11112                Self::ENCODED_LEN,
11113                __tmp.remaining(),
11114            )
11115        }
11116        __tmp.put_u8(self.vtol_state as u8);
11117        __tmp.put_u8(self.landed_state as u8);
11118        if matches!(version, MavlinkVersion::V2) {
11119            let len = __tmp.len();
11120            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11121        } else {
11122            __tmp.len()
11123        }
11124    }
11125}
11126#[doc = "id: 162"]
11127#[doc = "Status of geo-fencing. Sent in extended status stream when fencing enabled."]
11128#[derive(Debug, Clone, PartialEq)]
11129#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11130#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11131pub struct FENCE_STATUS_DATA {
11132    #[doc = "Time (since boot) of last breach."]
11133    pub breach_time: u32,
11134    #[doc = "Number of fence breaches."]
11135    pub breach_count: u16,
11136    #[doc = "Breach status (0 if currently inside fence, 1 if outside)."]
11137    pub breach_status: u8,
11138    #[doc = "Last breach type."]
11139    pub breach_type: FenceBreach,
11140    #[doc = "Active action to prevent fence breach"]
11141    #[cfg_attr(feature = "serde", serde(default))]
11142    pub breach_mitigation: FenceMitigate,
11143}
11144impl FENCE_STATUS_DATA {
11145    pub const ENCODED_LEN: usize = 9usize;
11146    pub const DEFAULT: Self = Self {
11147        breach_time: 0_u32,
11148        breach_count: 0_u16,
11149        breach_status: 0_u8,
11150        breach_type: FenceBreach::DEFAULT,
11151        breach_mitigation: FenceMitigate::DEFAULT,
11152    };
11153    #[cfg(feature = "arbitrary")]
11154    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11155        use arbitrary::{Arbitrary, Unstructured};
11156        let mut buf = [0u8; 1024];
11157        rng.fill_bytes(&mut buf);
11158        let mut unstructured = Unstructured::new(&buf);
11159        Self::arbitrary(&mut unstructured).unwrap_or_default()
11160    }
11161}
11162impl Default for FENCE_STATUS_DATA {
11163    fn default() -> Self {
11164        Self::DEFAULT.clone()
11165    }
11166}
11167impl MessageData for FENCE_STATUS_DATA {
11168    type Message = MavMessage;
11169    const ID: u32 = 162u32;
11170    const NAME: &'static str = "FENCE_STATUS";
11171    const EXTRA_CRC: u8 = 189u8;
11172    const ENCODED_LEN: usize = 9usize;
11173    fn deser(
11174        _version: MavlinkVersion,
11175        __input: &[u8],
11176    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11177        let avail_len = __input.len();
11178        let mut payload_buf = [0; Self::ENCODED_LEN];
11179        let mut buf = if avail_len < Self::ENCODED_LEN {
11180            payload_buf[0..avail_len].copy_from_slice(__input);
11181            Bytes::new(&payload_buf)
11182        } else {
11183            Bytes::new(__input)
11184        };
11185        let mut __struct = Self::default();
11186        __struct.breach_time = buf.get_u32_le();
11187        __struct.breach_count = buf.get_u16_le();
11188        __struct.breach_status = buf.get_u8();
11189        let tmp = buf.get_u8();
11190        __struct.breach_type =
11191            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11192                enum_type: "FenceBreach",
11193                value: tmp as u32,
11194            })?;
11195        let tmp = buf.get_u8();
11196        __struct.breach_mitigation =
11197            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
11198                enum_type: "FenceMitigate",
11199                value: tmp as u32,
11200            })?;
11201        Ok(__struct)
11202    }
11203    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11204        let mut __tmp = BytesMut::new(bytes);
11205        #[allow(clippy::absurd_extreme_comparisons)]
11206        #[allow(unused_comparisons)]
11207        if __tmp.remaining() < Self::ENCODED_LEN {
11208            panic!(
11209                "buffer is too small (need {} bytes, but got {})",
11210                Self::ENCODED_LEN,
11211                __tmp.remaining(),
11212            )
11213        }
11214        __tmp.put_u32_le(self.breach_time);
11215        __tmp.put_u16_le(self.breach_count);
11216        __tmp.put_u8(self.breach_status);
11217        __tmp.put_u8(self.breach_type as u8);
11218        __tmp.put_u8(self.breach_mitigation as u8);
11219        if matches!(version, MavlinkVersion::V2) {
11220            let len = __tmp.len();
11221            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11222        } else {
11223            __tmp.len()
11224        }
11225    }
11226}
11227#[doc = "id: 110"]
11228#[doc = "File transfer protocol message: <https://mavlink.io/en/services/ftp.html>."]
11229#[derive(Debug, Clone, PartialEq)]
11230#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11231#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11232pub struct FILE_TRANSFER_PROTOCOL_DATA {
11233    #[doc = "Network ID (0 for broadcast)"]
11234    pub target_network: u8,
11235    #[doc = "System ID (0 for broadcast)"]
11236    pub target_system: u8,
11237    #[doc = "Component ID (0 for broadcast)"]
11238    pub target_component: u8,
11239    #[doc = "Variable length payload. The length is defined by the remaining message length when subtracting the header and other fields. The content/format of this block is defined in <https://mavlink.io/en/services/ftp.html>."]
11240    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11241    pub payload: [u8; 251],
11242}
11243impl FILE_TRANSFER_PROTOCOL_DATA {
11244    pub const ENCODED_LEN: usize = 254usize;
11245    pub const DEFAULT: Self = Self {
11246        target_network: 0_u8,
11247        target_system: 0_u8,
11248        target_component: 0_u8,
11249        payload: [0_u8; 251usize],
11250    };
11251    #[cfg(feature = "arbitrary")]
11252    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11253        use arbitrary::{Arbitrary, Unstructured};
11254        let mut buf = [0u8; 1024];
11255        rng.fill_bytes(&mut buf);
11256        let mut unstructured = Unstructured::new(&buf);
11257        Self::arbitrary(&mut unstructured).unwrap_or_default()
11258    }
11259}
11260impl Default for FILE_TRANSFER_PROTOCOL_DATA {
11261    fn default() -> Self {
11262        Self::DEFAULT.clone()
11263    }
11264}
11265impl MessageData for FILE_TRANSFER_PROTOCOL_DATA {
11266    type Message = MavMessage;
11267    const ID: u32 = 110u32;
11268    const NAME: &'static str = "FILE_TRANSFER_PROTOCOL";
11269    const EXTRA_CRC: u8 = 84u8;
11270    const ENCODED_LEN: usize = 254usize;
11271    fn deser(
11272        _version: MavlinkVersion,
11273        __input: &[u8],
11274    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11275        let avail_len = __input.len();
11276        let mut payload_buf = [0; Self::ENCODED_LEN];
11277        let mut buf = if avail_len < Self::ENCODED_LEN {
11278            payload_buf[0..avail_len].copy_from_slice(__input);
11279            Bytes::new(&payload_buf)
11280        } else {
11281            Bytes::new(__input)
11282        };
11283        let mut __struct = Self::default();
11284        __struct.target_network = buf.get_u8();
11285        __struct.target_system = buf.get_u8();
11286        __struct.target_component = buf.get_u8();
11287        for v in &mut __struct.payload {
11288            let val = buf.get_u8();
11289            *v = val;
11290        }
11291        Ok(__struct)
11292    }
11293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11294        let mut __tmp = BytesMut::new(bytes);
11295        #[allow(clippy::absurd_extreme_comparisons)]
11296        #[allow(unused_comparisons)]
11297        if __tmp.remaining() < Self::ENCODED_LEN {
11298            panic!(
11299                "buffer is too small (need {} bytes, but got {})",
11300                Self::ENCODED_LEN,
11301                __tmp.remaining(),
11302            )
11303        }
11304        __tmp.put_u8(self.target_network);
11305        __tmp.put_u8(self.target_system);
11306        __tmp.put_u8(self.target_component);
11307        for val in &self.payload {
11308            __tmp.put_u8(*val);
11309        }
11310        if matches!(version, MavlinkVersion::V2) {
11311            let len = __tmp.len();
11312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11313        } else {
11314            __tmp.len()
11315        }
11316    }
11317}
11318#[doc = "id: 264"]
11319#[doc = "Flight information.         This includes time since boot for arm, takeoff, and land, and a flight number.         Takeoff and landing values reset to zero on arm.         This can be requested using MAV_CMD_REQUEST_MESSAGE.         Note, some fields are misnamed - timestamps are from boot (not UTC) and the flight_uuid is a sequence number."]
11320#[derive(Debug, Clone, PartialEq)]
11321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11323pub struct FLIGHT_INFORMATION_DATA {
11324    #[doc = "Timestamp at arming (since system boot). Set to 0 on boot. Set value on arming. Note, field is misnamed UTC."]
11325    pub arming_time_utc: u64,
11326    #[doc = "Timestamp at takeoff (since system boot). Set to 0 at boot and on arming. Note, field is misnamed UTC."]
11327    pub takeoff_time_utc: u64,
11328    #[doc = "Flight number. Note, field is misnamed UUID."]
11329    pub flight_uuid: u64,
11330    #[doc = "Timestamp (time since system boot)."]
11331    pub time_boot_ms: u32,
11332    #[doc = "Timestamp at landing (in ms since system boot). Set to 0 at boot and on arming."]
11333    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11334    pub landing_time: u32,
11335}
11336impl FLIGHT_INFORMATION_DATA {
11337    pub const ENCODED_LEN: usize = 32usize;
11338    pub const DEFAULT: Self = Self {
11339        arming_time_utc: 0_u64,
11340        takeoff_time_utc: 0_u64,
11341        flight_uuid: 0_u64,
11342        time_boot_ms: 0_u32,
11343        landing_time: 0_u32,
11344    };
11345    #[cfg(feature = "arbitrary")]
11346    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11347        use arbitrary::{Arbitrary, Unstructured};
11348        let mut buf = [0u8; 1024];
11349        rng.fill_bytes(&mut buf);
11350        let mut unstructured = Unstructured::new(&buf);
11351        Self::arbitrary(&mut unstructured).unwrap_or_default()
11352    }
11353}
11354impl Default for FLIGHT_INFORMATION_DATA {
11355    fn default() -> Self {
11356        Self::DEFAULT.clone()
11357    }
11358}
11359impl MessageData for FLIGHT_INFORMATION_DATA {
11360    type Message = MavMessage;
11361    const ID: u32 = 264u32;
11362    const NAME: &'static str = "FLIGHT_INFORMATION";
11363    const EXTRA_CRC: u8 = 49u8;
11364    const ENCODED_LEN: usize = 32usize;
11365    fn deser(
11366        _version: MavlinkVersion,
11367        __input: &[u8],
11368    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11369        let avail_len = __input.len();
11370        let mut payload_buf = [0; Self::ENCODED_LEN];
11371        let mut buf = if avail_len < Self::ENCODED_LEN {
11372            payload_buf[0..avail_len].copy_from_slice(__input);
11373            Bytes::new(&payload_buf)
11374        } else {
11375            Bytes::new(__input)
11376        };
11377        let mut __struct = Self::default();
11378        __struct.arming_time_utc = buf.get_u64_le();
11379        __struct.takeoff_time_utc = buf.get_u64_le();
11380        __struct.flight_uuid = buf.get_u64_le();
11381        __struct.time_boot_ms = buf.get_u32_le();
11382        __struct.landing_time = buf.get_u32_le();
11383        Ok(__struct)
11384    }
11385    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11386        let mut __tmp = BytesMut::new(bytes);
11387        #[allow(clippy::absurd_extreme_comparisons)]
11388        #[allow(unused_comparisons)]
11389        if __tmp.remaining() < Self::ENCODED_LEN {
11390            panic!(
11391                "buffer is too small (need {} bytes, but got {})",
11392                Self::ENCODED_LEN,
11393                __tmp.remaining(),
11394            )
11395        }
11396        __tmp.put_u64_le(self.arming_time_utc);
11397        __tmp.put_u64_le(self.takeoff_time_utc);
11398        __tmp.put_u64_le(self.flight_uuid);
11399        __tmp.put_u32_le(self.time_boot_ms);
11400        __tmp.put_u32_le(self.landing_time);
11401        if matches!(version, MavlinkVersion::V2) {
11402            let len = __tmp.len();
11403            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11404        } else {
11405            __tmp.len()
11406        }
11407    }
11408}
11409#[doc = "id: 144"]
11410#[doc = "Current motion information from a designated system."]
11411#[derive(Debug, Clone, PartialEq)]
11412#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11413#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11414pub struct FOLLOW_TARGET_DATA {
11415    #[doc = "Timestamp (time since system boot)."]
11416    pub timestamp: u64,
11417    #[doc = "button states or switches of a tracker device"]
11418    pub custom_state: u64,
11419    #[doc = "Latitude (WGS84)"]
11420    pub lat: i32,
11421    #[doc = "Longitude (WGS84)"]
11422    pub lon: i32,
11423    #[doc = "Altitude (MSL)"]
11424    pub alt: f32,
11425    #[doc = "target velocity (0,0,0) for unknown"]
11426    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11427    pub vel: [f32; 3],
11428    #[doc = "linear target acceleration (0,0,0) for unknown"]
11429    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11430    pub acc: [f32; 3],
11431    #[doc = "(0 0 0 0 for unknown)"]
11432    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11433    pub attitude_q: [f32; 4],
11434    #[doc = "(0 0 0 for unknown)"]
11435    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11436    pub rates: [f32; 3],
11437    #[doc = "eph epv"]
11438    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11439    pub position_cov: [f32; 3],
11440    #[doc = "bit positions for tracker reporting capabilities (POS = 0, VEL = 1, ACCEL = 2, ATT + RATES = 3)"]
11441    pub est_capabilities: u8,
11442}
11443impl FOLLOW_TARGET_DATA {
11444    pub const ENCODED_LEN: usize = 93usize;
11445    pub const DEFAULT: Self = Self {
11446        timestamp: 0_u64,
11447        custom_state: 0_u64,
11448        lat: 0_i32,
11449        lon: 0_i32,
11450        alt: 0.0_f32,
11451        vel: [0.0_f32; 3usize],
11452        acc: [0.0_f32; 3usize],
11453        attitude_q: [0.0_f32; 4usize],
11454        rates: [0.0_f32; 3usize],
11455        position_cov: [0.0_f32; 3usize],
11456        est_capabilities: 0_u8,
11457    };
11458    #[cfg(feature = "arbitrary")]
11459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11460        use arbitrary::{Arbitrary, Unstructured};
11461        let mut buf = [0u8; 1024];
11462        rng.fill_bytes(&mut buf);
11463        let mut unstructured = Unstructured::new(&buf);
11464        Self::arbitrary(&mut unstructured).unwrap_or_default()
11465    }
11466}
11467impl Default for FOLLOW_TARGET_DATA {
11468    fn default() -> Self {
11469        Self::DEFAULT.clone()
11470    }
11471}
11472impl MessageData for FOLLOW_TARGET_DATA {
11473    type Message = MavMessage;
11474    const ID: u32 = 144u32;
11475    const NAME: &'static str = "FOLLOW_TARGET";
11476    const EXTRA_CRC: u8 = 127u8;
11477    const ENCODED_LEN: usize = 93usize;
11478    fn deser(
11479        _version: MavlinkVersion,
11480        __input: &[u8],
11481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11482        let avail_len = __input.len();
11483        let mut payload_buf = [0; Self::ENCODED_LEN];
11484        let mut buf = if avail_len < Self::ENCODED_LEN {
11485            payload_buf[0..avail_len].copy_from_slice(__input);
11486            Bytes::new(&payload_buf)
11487        } else {
11488            Bytes::new(__input)
11489        };
11490        let mut __struct = Self::default();
11491        __struct.timestamp = buf.get_u64_le();
11492        __struct.custom_state = buf.get_u64_le();
11493        __struct.lat = buf.get_i32_le();
11494        __struct.lon = buf.get_i32_le();
11495        __struct.alt = buf.get_f32_le();
11496        for v in &mut __struct.vel {
11497            let val = buf.get_f32_le();
11498            *v = val;
11499        }
11500        for v in &mut __struct.acc {
11501            let val = buf.get_f32_le();
11502            *v = val;
11503        }
11504        for v in &mut __struct.attitude_q {
11505            let val = buf.get_f32_le();
11506            *v = val;
11507        }
11508        for v in &mut __struct.rates {
11509            let val = buf.get_f32_le();
11510            *v = val;
11511        }
11512        for v in &mut __struct.position_cov {
11513            let val = buf.get_f32_le();
11514            *v = val;
11515        }
11516        __struct.est_capabilities = buf.get_u8();
11517        Ok(__struct)
11518    }
11519    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11520        let mut __tmp = BytesMut::new(bytes);
11521        #[allow(clippy::absurd_extreme_comparisons)]
11522        #[allow(unused_comparisons)]
11523        if __tmp.remaining() < Self::ENCODED_LEN {
11524            panic!(
11525                "buffer is too small (need {} bytes, but got {})",
11526                Self::ENCODED_LEN,
11527                __tmp.remaining(),
11528            )
11529        }
11530        __tmp.put_u64_le(self.timestamp);
11531        __tmp.put_u64_le(self.custom_state);
11532        __tmp.put_i32_le(self.lat);
11533        __tmp.put_i32_le(self.lon);
11534        __tmp.put_f32_le(self.alt);
11535        for val in &self.vel {
11536            __tmp.put_f32_le(*val);
11537        }
11538        for val in &self.acc {
11539            __tmp.put_f32_le(*val);
11540        }
11541        for val in &self.attitude_q {
11542            __tmp.put_f32_le(*val);
11543        }
11544        for val in &self.rates {
11545            __tmp.put_f32_le(*val);
11546        }
11547        for val in &self.position_cov {
11548            __tmp.put_f32_le(*val);
11549        }
11550        __tmp.put_u8(self.est_capabilities);
11551        if matches!(version, MavlinkVersion::V2) {
11552            let len = __tmp.len();
11553            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11554        } else {
11555            __tmp.len()
11556        }
11557    }
11558}
11559#[doc = "id: 371"]
11560#[doc = "Fuel status.         This message provides \"generic\" fuel level information for  in a GCS and for triggering failsafes in an autopilot.         The fuel type and associated units for fields in this message are defined in the enum MAV_FUEL_TYPE.          The reported `consumed_fuel` and `remaining_fuel` must only be supplied if measured: they must not be inferred from the `maximum_fuel` and the other value.         A recipient can assume that if these fields are supplied they are accurate.         If not provided, the recipient can infer `remaining_fuel` from `maximum_fuel` and `consumed_fuel` on the assumption that the fuel was initially at its maximum (this is what battery monitors assume).         Note however that this is an assumption, and the UI should prompt the user appropriately (i.e. notify user that they should fill the tank before boot).          This kind of information may also be sent in fuel-specific messages such as BATTERY_STATUS_V2.         If both messages are sent for the same fuel system, the ids and corresponding information must match.          This should be streamed (nominally at 0.1 Hz)."]
11561#[derive(Debug, Clone, PartialEq)]
11562#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11563#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11564pub struct FUEL_STATUS_DATA {
11565    #[doc = "Capacity when full. Must be provided."]
11566    pub maximum_fuel: f32,
11567    #[doc = "Consumed fuel (measured). This value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11568    pub consumed_fuel: f32,
11569    #[doc = "Remaining fuel until empty (measured). The value should not be inferred: if not measured set to NaN. NaN: field not provided."]
11570    pub remaining_fuel: f32,
11571    #[doc = "Positive value when emptying/using, and negative if filling/replacing. NaN: field not provided."]
11572    pub flow_rate: f32,
11573    #[doc = "Fuel temperature. NaN: field not provided."]
11574    pub temperature: f32,
11575    #[doc = "Fuel type. Defines units for fuel capacity and consumption fields above."]
11576    pub fuel_type: MavFuelType,
11577    #[doc = "Fuel ID. Must match ID of other messages for same fuel system, such as BATTERY_STATUS_V2."]
11578    pub id: u8,
11579    #[doc = "Percentage of remaining fuel, relative to full. Values: [0-100], UINT8_MAX: field not provided."]
11580    pub percent_remaining: u8,
11581}
11582impl FUEL_STATUS_DATA {
11583    pub const ENCODED_LEN: usize = 26usize;
11584    pub const DEFAULT: Self = Self {
11585        maximum_fuel: 0.0_f32,
11586        consumed_fuel: 0.0_f32,
11587        remaining_fuel: 0.0_f32,
11588        flow_rate: 0.0_f32,
11589        temperature: 0.0_f32,
11590        fuel_type: MavFuelType::DEFAULT,
11591        id: 0_u8,
11592        percent_remaining: 0_u8,
11593    };
11594    #[cfg(feature = "arbitrary")]
11595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11596        use arbitrary::{Arbitrary, Unstructured};
11597        let mut buf = [0u8; 1024];
11598        rng.fill_bytes(&mut buf);
11599        let mut unstructured = Unstructured::new(&buf);
11600        Self::arbitrary(&mut unstructured).unwrap_or_default()
11601    }
11602}
11603impl Default for FUEL_STATUS_DATA {
11604    fn default() -> Self {
11605        Self::DEFAULT.clone()
11606    }
11607}
11608impl MessageData for FUEL_STATUS_DATA {
11609    type Message = MavMessage;
11610    const ID: u32 = 371u32;
11611    const NAME: &'static str = "FUEL_STATUS";
11612    const EXTRA_CRC: u8 = 10u8;
11613    const ENCODED_LEN: usize = 26usize;
11614    fn deser(
11615        _version: MavlinkVersion,
11616        __input: &[u8],
11617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11618        let avail_len = __input.len();
11619        let mut payload_buf = [0; Self::ENCODED_LEN];
11620        let mut buf = if avail_len < Self::ENCODED_LEN {
11621            payload_buf[0..avail_len].copy_from_slice(__input);
11622            Bytes::new(&payload_buf)
11623        } else {
11624            Bytes::new(__input)
11625        };
11626        let mut __struct = Self::default();
11627        __struct.maximum_fuel = buf.get_f32_le();
11628        __struct.consumed_fuel = buf.get_f32_le();
11629        __struct.remaining_fuel = buf.get_f32_le();
11630        __struct.flow_rate = buf.get_f32_le();
11631        __struct.temperature = buf.get_f32_le();
11632        let tmp = buf.get_u32_le();
11633        __struct.fuel_type = FromPrimitive::from_u32(tmp).ok_or(
11634            ::mavlink_core::error::ParserError::InvalidEnum {
11635                enum_type: "MavFuelType",
11636                value: tmp as u32,
11637            },
11638        )?;
11639        __struct.id = buf.get_u8();
11640        __struct.percent_remaining = buf.get_u8();
11641        Ok(__struct)
11642    }
11643    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11644        let mut __tmp = BytesMut::new(bytes);
11645        #[allow(clippy::absurd_extreme_comparisons)]
11646        #[allow(unused_comparisons)]
11647        if __tmp.remaining() < Self::ENCODED_LEN {
11648            panic!(
11649                "buffer is too small (need {} bytes, but got {})",
11650                Self::ENCODED_LEN,
11651                __tmp.remaining(),
11652            )
11653        }
11654        __tmp.put_f32_le(self.maximum_fuel);
11655        __tmp.put_f32_le(self.consumed_fuel);
11656        __tmp.put_f32_le(self.remaining_fuel);
11657        __tmp.put_f32_le(self.flow_rate);
11658        __tmp.put_f32_le(self.temperature);
11659        __tmp.put_u32_le(self.fuel_type as u32);
11660        __tmp.put_u8(self.id);
11661        __tmp.put_u8(self.percent_remaining);
11662        if matches!(version, MavlinkVersion::V2) {
11663            let len = __tmp.len();
11664            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11665        } else {
11666            __tmp.len()
11667        }
11668    }
11669}
11670#[doc = "id: 373"]
11671#[doc = "Telemetry of power generation system. Alternator or mechanical generator."]
11672#[derive(Debug, Clone, PartialEq)]
11673#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11674#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11675pub struct GENERATOR_STATUS_DATA {
11676    #[doc = "Status flags."]
11677    pub status: MavGeneratorStatusFlag,
11678    #[doc = "Current into/out of battery. Positive for out. Negative for in. NaN: field not provided."]
11679    pub battery_current: f32,
11680    #[doc = "Current going to the UAV. If battery current not available this is the DC current from the generator. Positive for out. Negative for in. NaN: field not provided"]
11681    pub load_current: f32,
11682    #[doc = "The power being generated. NaN: field not provided"]
11683    pub power_generated: f32,
11684    #[doc = "Voltage of the bus seen at the generator, or battery bus if battery bus is controlled by generator and at a different voltage to main bus."]
11685    pub bus_voltage: f32,
11686    #[doc = "The target battery current. Positive for out. Negative for in. NaN: field not provided"]
11687    pub bat_current_setpoint: f32,
11688    #[doc = "Seconds this generator has run since it was rebooted. UINT32_MAX: field not provided."]
11689    pub runtime: u32,
11690    #[doc = "Seconds until this generator requires maintenance.  A negative value indicates maintenance is past-due. INT32_MAX: field not provided."]
11691    pub time_until_maintenance: i32,
11692    #[doc = "Speed of electrical generator or alternator. UINT16_MAX: field not provided."]
11693    pub generator_speed: u16,
11694    #[doc = "The temperature of the rectifier or power converter. INT16_MAX: field not provided."]
11695    pub rectifier_temperature: i16,
11696    #[doc = "The temperature of the mechanical motor, fuel cell core or generator. INT16_MAX: field not provided."]
11697    pub generator_temperature: i16,
11698}
11699impl GENERATOR_STATUS_DATA {
11700    pub const ENCODED_LEN: usize = 42usize;
11701    pub const DEFAULT: Self = Self {
11702        status: MavGeneratorStatusFlag::DEFAULT,
11703        battery_current: 0.0_f32,
11704        load_current: 0.0_f32,
11705        power_generated: 0.0_f32,
11706        bus_voltage: 0.0_f32,
11707        bat_current_setpoint: 0.0_f32,
11708        runtime: 0_u32,
11709        time_until_maintenance: 0_i32,
11710        generator_speed: 0_u16,
11711        rectifier_temperature: 0_i16,
11712        generator_temperature: 0_i16,
11713    };
11714    #[cfg(feature = "arbitrary")]
11715    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11716        use arbitrary::{Arbitrary, Unstructured};
11717        let mut buf = [0u8; 1024];
11718        rng.fill_bytes(&mut buf);
11719        let mut unstructured = Unstructured::new(&buf);
11720        Self::arbitrary(&mut unstructured).unwrap_or_default()
11721    }
11722}
11723impl Default for GENERATOR_STATUS_DATA {
11724    fn default() -> Self {
11725        Self::DEFAULT.clone()
11726    }
11727}
11728impl MessageData for GENERATOR_STATUS_DATA {
11729    type Message = MavMessage;
11730    const ID: u32 = 373u32;
11731    const NAME: &'static str = "GENERATOR_STATUS";
11732    const EXTRA_CRC: u8 = 117u8;
11733    const ENCODED_LEN: usize = 42usize;
11734    fn deser(
11735        _version: MavlinkVersion,
11736        __input: &[u8],
11737    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11738        let avail_len = __input.len();
11739        let mut payload_buf = [0; Self::ENCODED_LEN];
11740        let mut buf = if avail_len < Self::ENCODED_LEN {
11741            payload_buf[0..avail_len].copy_from_slice(__input);
11742            Bytes::new(&payload_buf)
11743        } else {
11744            Bytes::new(__input)
11745        };
11746        let mut __struct = Self::default();
11747        let tmp = buf.get_u64_le();
11748        __struct.status = MavGeneratorStatusFlag::from_bits(
11749            tmp & MavGeneratorStatusFlag::all().bits(),
11750        )
11751        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11752            flag_type: "MavGeneratorStatusFlag",
11753            value: tmp as u32,
11754        })?;
11755        __struct.battery_current = buf.get_f32_le();
11756        __struct.load_current = buf.get_f32_le();
11757        __struct.power_generated = buf.get_f32_le();
11758        __struct.bus_voltage = buf.get_f32_le();
11759        __struct.bat_current_setpoint = buf.get_f32_le();
11760        __struct.runtime = buf.get_u32_le();
11761        __struct.time_until_maintenance = buf.get_i32_le();
11762        __struct.generator_speed = buf.get_u16_le();
11763        __struct.rectifier_temperature = buf.get_i16_le();
11764        __struct.generator_temperature = buf.get_i16_le();
11765        Ok(__struct)
11766    }
11767    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11768        let mut __tmp = BytesMut::new(bytes);
11769        #[allow(clippy::absurd_extreme_comparisons)]
11770        #[allow(unused_comparisons)]
11771        if __tmp.remaining() < Self::ENCODED_LEN {
11772            panic!(
11773                "buffer is too small (need {} bytes, but got {})",
11774                Self::ENCODED_LEN,
11775                __tmp.remaining(),
11776            )
11777        }
11778        __tmp.put_u64_le(self.status.bits());
11779        __tmp.put_f32_le(self.battery_current);
11780        __tmp.put_f32_le(self.load_current);
11781        __tmp.put_f32_le(self.power_generated);
11782        __tmp.put_f32_le(self.bus_voltage);
11783        __tmp.put_f32_le(self.bat_current_setpoint);
11784        __tmp.put_u32_le(self.runtime);
11785        __tmp.put_i32_le(self.time_until_maintenance);
11786        __tmp.put_u16_le(self.generator_speed);
11787        __tmp.put_i16_le(self.rectifier_temperature);
11788        __tmp.put_i16_le(self.generator_temperature);
11789        if matches!(version, MavlinkVersion::V2) {
11790            let len = __tmp.len();
11791            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11792        } else {
11793            __tmp.len()
11794        }
11795    }
11796}
11797#[doc = "id: 285"]
11798#[doc = "Message reporting the status of a gimbal device. \t  This message should be broadcast by a gimbal device component at a low regular rate (e.g. 5 Hz). \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Other conditions of the flags are not allowed. \t  The quaternion and angular velocities in the other frame can be calculated from delta_yaw and delta_yaw_velocity as \t  q_earth = q_delta_yaw * q_vehicle and w_earth = w_delta_yaw_velocity + w_vehicle (if not NaN). \t  If neither the GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME nor the GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME flag is set, \t  then (for backwards compatibility) the data in the delta_yaw and delta_yaw_velocity fields are to be ignored. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME, \t  and always should set delta_yaw and delta_yaw_velocity either to the proper value or NaN."]
11799#[derive(Debug, Clone, PartialEq)]
11800#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11801#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11802pub struct GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11803    #[doc = "Timestamp (time since system boot)."]
11804    pub time_boot_ms: u32,
11805    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description."]
11806    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11807    pub q: [f32; 4],
11808    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN if unknown."]
11809    pub angular_velocity_x: f32,
11810    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN if unknown."]
11811    pub angular_velocity_y: f32,
11812    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN if unknown."]
11813    pub angular_velocity_z: f32,
11814    #[doc = "Failure flags (0 for no failure)"]
11815    pub failure_flags: GimbalDeviceErrorFlags,
11816    #[doc = "Current gimbal flags set."]
11817    pub flags: GimbalDeviceFlags,
11818    #[doc = "System ID"]
11819    pub target_system: u8,
11820    #[doc = "Component ID"]
11821    pub target_component: u8,
11822    #[doc = "Yaw angle relating the quaternions in earth and body frames (see message description). NaN if unknown."]
11823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11824    pub delta_yaw: f32,
11825    #[doc = "Yaw angular velocity relating the angular velocities in earth and body frames (see message description). NaN if unknown."]
11826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11827    pub delta_yaw_velocity: f32,
11828    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11829    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11830    pub gimbal_device_id: u8,
11831}
11832impl GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11833    pub const ENCODED_LEN: usize = 49usize;
11834    pub const DEFAULT: Self = Self {
11835        time_boot_ms: 0_u32,
11836        q: [0.0_f32; 4usize],
11837        angular_velocity_x: 0.0_f32,
11838        angular_velocity_y: 0.0_f32,
11839        angular_velocity_z: 0.0_f32,
11840        failure_flags: GimbalDeviceErrorFlags::DEFAULT,
11841        flags: GimbalDeviceFlags::DEFAULT,
11842        target_system: 0_u8,
11843        target_component: 0_u8,
11844        delta_yaw: 0.0_f32,
11845        delta_yaw_velocity: 0.0_f32,
11846        gimbal_device_id: 0_u8,
11847    };
11848    #[cfg(feature = "arbitrary")]
11849    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
11850        use arbitrary::{Arbitrary, Unstructured};
11851        let mut buf = [0u8; 1024];
11852        rng.fill_bytes(&mut buf);
11853        let mut unstructured = Unstructured::new(&buf);
11854        Self::arbitrary(&mut unstructured).unwrap_or_default()
11855    }
11856}
11857impl Default for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11858    fn default() -> Self {
11859        Self::DEFAULT.clone()
11860    }
11861}
11862impl MessageData for GIMBAL_DEVICE_ATTITUDE_STATUS_DATA {
11863    type Message = MavMessage;
11864    const ID: u32 = 285u32;
11865    const NAME: &'static str = "GIMBAL_DEVICE_ATTITUDE_STATUS";
11866    const EXTRA_CRC: u8 = 137u8;
11867    const ENCODED_LEN: usize = 49usize;
11868    fn deser(
11869        _version: MavlinkVersion,
11870        __input: &[u8],
11871    ) -> Result<Self, ::mavlink_core::error::ParserError> {
11872        let avail_len = __input.len();
11873        let mut payload_buf = [0; Self::ENCODED_LEN];
11874        let mut buf = if avail_len < Self::ENCODED_LEN {
11875            payload_buf[0..avail_len].copy_from_slice(__input);
11876            Bytes::new(&payload_buf)
11877        } else {
11878            Bytes::new(__input)
11879        };
11880        let mut __struct = Self::default();
11881        __struct.time_boot_ms = buf.get_u32_le();
11882        for v in &mut __struct.q {
11883            let val = buf.get_f32_le();
11884            *v = val;
11885        }
11886        __struct.angular_velocity_x = buf.get_f32_le();
11887        __struct.angular_velocity_y = buf.get_f32_le();
11888        __struct.angular_velocity_z = buf.get_f32_le();
11889        let tmp = buf.get_u32_le();
11890        __struct.failure_flags = GimbalDeviceErrorFlags::from_bits(
11891            tmp & GimbalDeviceErrorFlags::all().bits(),
11892        )
11893        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11894            flag_type: "GimbalDeviceErrorFlags",
11895            value: tmp as u32,
11896        })?;
11897        let tmp = buf.get_u16_le();
11898        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
11899            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
11900                flag_type: "GimbalDeviceFlags",
11901                value: tmp as u32,
11902            })?;
11903        __struct.target_system = buf.get_u8();
11904        __struct.target_component = buf.get_u8();
11905        __struct.delta_yaw = buf.get_f32_le();
11906        __struct.delta_yaw_velocity = buf.get_f32_le();
11907        __struct.gimbal_device_id = buf.get_u8();
11908        Ok(__struct)
11909    }
11910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
11911        let mut __tmp = BytesMut::new(bytes);
11912        #[allow(clippy::absurd_extreme_comparisons)]
11913        #[allow(unused_comparisons)]
11914        if __tmp.remaining() < Self::ENCODED_LEN {
11915            panic!(
11916                "buffer is too small (need {} bytes, but got {})",
11917                Self::ENCODED_LEN,
11918                __tmp.remaining(),
11919            )
11920        }
11921        __tmp.put_u32_le(self.time_boot_ms);
11922        for val in &self.q {
11923            __tmp.put_f32_le(*val);
11924        }
11925        __tmp.put_f32_le(self.angular_velocity_x);
11926        __tmp.put_f32_le(self.angular_velocity_y);
11927        __tmp.put_f32_le(self.angular_velocity_z);
11928        __tmp.put_u32_le(self.failure_flags.bits());
11929        __tmp.put_u16_le(self.flags.bits());
11930        __tmp.put_u8(self.target_system);
11931        __tmp.put_u8(self.target_component);
11932        __tmp.put_f32_le(self.delta_yaw);
11933        __tmp.put_f32_le(self.delta_yaw_velocity);
11934        __tmp.put_u8(self.gimbal_device_id);
11935        if matches!(version, MavlinkVersion::V2) {
11936            let len = __tmp.len();
11937            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
11938        } else {
11939            __tmp.len()
11940        }
11941    }
11942}
11943#[doc = "id: 283"]
11944#[doc = "Information about a low level gimbal. This message should be requested by the gimbal manager or a ground station using MAV_CMD_REQUEST_MESSAGE. The maximum angles and rates are the limits by hardware. However, the limits by software used are likely different/smaller and dependent on mode/settings/etc.."]
11945#[derive(Debug, Clone, PartialEq)]
11946#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
11947#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
11948pub struct GIMBAL_DEVICE_INFORMATION_DATA {
11949    #[doc = "UID of gimbal hardware (0 if unknown)."]
11950    pub uid: u64,
11951    #[doc = "Timestamp (time since system boot)."]
11952    pub time_boot_ms: u32,
11953    #[doc = "0xff)."]
11954    pub firmware_version: u32,
11955    #[doc = "0xff)."]
11956    pub hardware_version: u32,
11957    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
11958    pub roll_min: f32,
11959    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left). NAN if unknown."]
11960    pub roll_max: f32,
11961    #[doc = "Minimum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
11962    pub pitch_min: f32,
11963    #[doc = "Maximum hardware pitch angle (positive: up, negative: down). NAN if unknown."]
11964    pub pitch_max: f32,
11965    #[doc = "Minimum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
11966    pub yaw_min: f32,
11967    #[doc = "Maximum hardware yaw angle (positive: to the right, negative: to the left). NAN if unknown."]
11968    pub yaw_max: f32,
11969    #[doc = "Bitmap of gimbal capability flags."]
11970    pub cap_flags: GimbalDeviceCapFlags,
11971    #[doc = "Bitmap for use for gimbal-specific capability flags."]
11972    pub custom_cap_flags: u16,
11973    #[doc = "Name of the gimbal vendor."]
11974    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11975    pub vendor_name: [u8; 32],
11976    #[doc = "Name of the gimbal model."]
11977    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11978    pub model_name: [u8; 32],
11979    #[doc = "Custom name of the gimbal given to it by the user."]
11980    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
11981    pub custom_name: [u8; 32],
11982    #[doc = "This field is to be used if the gimbal manager and the gimbal device are the same component and hence have the same component ID. This field is then set to a number between 1-6. If the component ID is separate, this field is not required and must be set to 0."]
11983    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
11984    pub gimbal_device_id: u8,
11985}
11986impl GIMBAL_DEVICE_INFORMATION_DATA {
11987    pub const ENCODED_LEN: usize = 145usize;
11988    pub const DEFAULT: Self = Self {
11989        uid: 0_u64,
11990        time_boot_ms: 0_u32,
11991        firmware_version: 0_u32,
11992        hardware_version: 0_u32,
11993        roll_min: 0.0_f32,
11994        roll_max: 0.0_f32,
11995        pitch_min: 0.0_f32,
11996        pitch_max: 0.0_f32,
11997        yaw_min: 0.0_f32,
11998        yaw_max: 0.0_f32,
11999        cap_flags: GimbalDeviceCapFlags::DEFAULT,
12000        custom_cap_flags: 0_u16,
12001        vendor_name: [0_u8; 32usize],
12002        model_name: [0_u8; 32usize],
12003        custom_name: [0_u8; 32usize],
12004        gimbal_device_id: 0_u8,
12005    };
12006    #[cfg(feature = "arbitrary")]
12007    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12008        use arbitrary::{Arbitrary, Unstructured};
12009        let mut buf = [0u8; 1024];
12010        rng.fill_bytes(&mut buf);
12011        let mut unstructured = Unstructured::new(&buf);
12012        Self::arbitrary(&mut unstructured).unwrap_or_default()
12013    }
12014}
12015impl Default for GIMBAL_DEVICE_INFORMATION_DATA {
12016    fn default() -> Self {
12017        Self::DEFAULT.clone()
12018    }
12019}
12020impl MessageData for GIMBAL_DEVICE_INFORMATION_DATA {
12021    type Message = MavMessage;
12022    const ID: u32 = 283u32;
12023    const NAME: &'static str = "GIMBAL_DEVICE_INFORMATION";
12024    const EXTRA_CRC: u8 = 74u8;
12025    const ENCODED_LEN: usize = 145usize;
12026    fn deser(
12027        _version: MavlinkVersion,
12028        __input: &[u8],
12029    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12030        let avail_len = __input.len();
12031        let mut payload_buf = [0; Self::ENCODED_LEN];
12032        let mut buf = if avail_len < Self::ENCODED_LEN {
12033            payload_buf[0..avail_len].copy_from_slice(__input);
12034            Bytes::new(&payload_buf)
12035        } else {
12036            Bytes::new(__input)
12037        };
12038        let mut __struct = Self::default();
12039        __struct.uid = buf.get_u64_le();
12040        __struct.time_boot_ms = buf.get_u32_le();
12041        __struct.firmware_version = buf.get_u32_le();
12042        __struct.hardware_version = buf.get_u32_le();
12043        __struct.roll_min = buf.get_f32_le();
12044        __struct.roll_max = buf.get_f32_le();
12045        __struct.pitch_min = buf.get_f32_le();
12046        __struct.pitch_max = buf.get_f32_le();
12047        __struct.yaw_min = buf.get_f32_le();
12048        __struct.yaw_max = buf.get_f32_le();
12049        let tmp = buf.get_u16_le();
12050        __struct.cap_flags = GimbalDeviceCapFlags::from_bits(
12051            tmp & GimbalDeviceCapFlags::all().bits(),
12052        )
12053        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12054            flag_type: "GimbalDeviceCapFlags",
12055            value: tmp as u32,
12056        })?;
12057        __struct.custom_cap_flags = buf.get_u16_le();
12058        for v in &mut __struct.vendor_name {
12059            let val = buf.get_u8();
12060            *v = val;
12061        }
12062        for v in &mut __struct.model_name {
12063            let val = buf.get_u8();
12064            *v = val;
12065        }
12066        for v in &mut __struct.custom_name {
12067            let val = buf.get_u8();
12068            *v = val;
12069        }
12070        __struct.gimbal_device_id = buf.get_u8();
12071        Ok(__struct)
12072    }
12073    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12074        let mut __tmp = BytesMut::new(bytes);
12075        #[allow(clippy::absurd_extreme_comparisons)]
12076        #[allow(unused_comparisons)]
12077        if __tmp.remaining() < Self::ENCODED_LEN {
12078            panic!(
12079                "buffer is too small (need {} bytes, but got {})",
12080                Self::ENCODED_LEN,
12081                __tmp.remaining(),
12082            )
12083        }
12084        __tmp.put_u64_le(self.uid);
12085        __tmp.put_u32_le(self.time_boot_ms);
12086        __tmp.put_u32_le(self.firmware_version);
12087        __tmp.put_u32_le(self.hardware_version);
12088        __tmp.put_f32_le(self.roll_min);
12089        __tmp.put_f32_le(self.roll_max);
12090        __tmp.put_f32_le(self.pitch_min);
12091        __tmp.put_f32_le(self.pitch_max);
12092        __tmp.put_f32_le(self.yaw_min);
12093        __tmp.put_f32_le(self.yaw_max);
12094        __tmp.put_u16_le(self.cap_flags.bits());
12095        __tmp.put_u16_le(self.custom_cap_flags);
12096        for val in &self.vendor_name {
12097            __tmp.put_u8(*val);
12098        }
12099        for val in &self.model_name {
12100            __tmp.put_u8(*val);
12101        }
12102        for val in &self.custom_name {
12103            __tmp.put_u8(*val);
12104        }
12105        __tmp.put_u8(self.gimbal_device_id);
12106        if matches!(version, MavlinkVersion::V2) {
12107            let len = __tmp.len();
12108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12109        } else {
12110            __tmp.len()
12111        }
12112    }
12113}
12114#[doc = "id: 284"]
12115#[doc = "Low level message to control a gimbal device's attitude. \t  This message is to be sent from the gimbal manager to the gimbal device component. \t  The quaternion and angular velocities can be set to NaN according to use case. \t  For the angles encoded in the quaternion and the angular velocities holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME is set, then they are relative to the vehicle heading (vehicle frame). \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is set, then they are relative to absolute North (earth frame). \t  If neither of these flags are set, then (for backwards compatibility) it holds: \t  If the flag GIMBAL_DEVICE_FLAGS_YAW_LOCK is set, then they are relative to absolute North (earth frame), \t  else they are relative to the vehicle heading (vehicle frame). \t  Setting both GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME and GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME is not allowed. \t  These rules are to ensure backwards compatibility. \t  New implementations should always set either GIMBAL_DEVICE_FLAGS_YAW_IN_VEHICLE_FRAME or GIMBAL_DEVICE_FLAGS_YAW_IN_EARTH_FRAME."]
12116#[derive(Debug, Clone, PartialEq)]
12117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12119pub struct GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12120    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation). The frame is described in the message description. Set fields to NaN to be ignored."]
12121    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12122    pub q: [f32; 4],
12123    #[doc = "X component of angular velocity (positive: rolling to the right). The frame is described in the message description. NaN to be ignored."]
12124    pub angular_velocity_x: f32,
12125    #[doc = "Y component of angular velocity (positive: pitching up). The frame is described in the message description. NaN to be ignored."]
12126    pub angular_velocity_y: f32,
12127    #[doc = "Z component of angular velocity (positive: yawing to the right). The frame is described in the message description. NaN to be ignored."]
12128    pub angular_velocity_z: f32,
12129    #[doc = "Low level gimbal flags."]
12130    pub flags: GimbalDeviceFlags,
12131    #[doc = "System ID"]
12132    pub target_system: u8,
12133    #[doc = "Component ID"]
12134    pub target_component: u8,
12135}
12136impl GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12137    pub const ENCODED_LEN: usize = 32usize;
12138    pub const DEFAULT: Self = Self {
12139        q: [0.0_f32; 4usize],
12140        angular_velocity_x: 0.0_f32,
12141        angular_velocity_y: 0.0_f32,
12142        angular_velocity_z: 0.0_f32,
12143        flags: GimbalDeviceFlags::DEFAULT,
12144        target_system: 0_u8,
12145        target_component: 0_u8,
12146    };
12147    #[cfg(feature = "arbitrary")]
12148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12149        use arbitrary::{Arbitrary, Unstructured};
12150        let mut buf = [0u8; 1024];
12151        rng.fill_bytes(&mut buf);
12152        let mut unstructured = Unstructured::new(&buf);
12153        Self::arbitrary(&mut unstructured).unwrap_or_default()
12154    }
12155}
12156impl Default for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12157    fn default() -> Self {
12158        Self::DEFAULT.clone()
12159    }
12160}
12161impl MessageData for GIMBAL_DEVICE_SET_ATTITUDE_DATA {
12162    type Message = MavMessage;
12163    const ID: u32 = 284u32;
12164    const NAME: &'static str = "GIMBAL_DEVICE_SET_ATTITUDE";
12165    const EXTRA_CRC: u8 = 99u8;
12166    const ENCODED_LEN: usize = 32usize;
12167    fn deser(
12168        _version: MavlinkVersion,
12169        __input: &[u8],
12170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12171        let avail_len = __input.len();
12172        let mut payload_buf = [0; Self::ENCODED_LEN];
12173        let mut buf = if avail_len < Self::ENCODED_LEN {
12174            payload_buf[0..avail_len].copy_from_slice(__input);
12175            Bytes::new(&payload_buf)
12176        } else {
12177            Bytes::new(__input)
12178        };
12179        let mut __struct = Self::default();
12180        for v in &mut __struct.q {
12181            let val = buf.get_f32_le();
12182            *v = val;
12183        }
12184        __struct.angular_velocity_x = buf.get_f32_le();
12185        __struct.angular_velocity_y = buf.get_f32_le();
12186        __struct.angular_velocity_z = buf.get_f32_le();
12187        let tmp = buf.get_u16_le();
12188        __struct.flags = GimbalDeviceFlags::from_bits(tmp & GimbalDeviceFlags::all().bits())
12189            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12190                flag_type: "GimbalDeviceFlags",
12191                value: tmp as u32,
12192            })?;
12193        __struct.target_system = buf.get_u8();
12194        __struct.target_component = buf.get_u8();
12195        Ok(__struct)
12196    }
12197    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12198        let mut __tmp = BytesMut::new(bytes);
12199        #[allow(clippy::absurd_extreme_comparisons)]
12200        #[allow(unused_comparisons)]
12201        if __tmp.remaining() < Self::ENCODED_LEN {
12202            panic!(
12203                "buffer is too small (need {} bytes, but got {})",
12204                Self::ENCODED_LEN,
12205                __tmp.remaining(),
12206            )
12207        }
12208        for val in &self.q {
12209            __tmp.put_f32_le(*val);
12210        }
12211        __tmp.put_f32_le(self.angular_velocity_x);
12212        __tmp.put_f32_le(self.angular_velocity_y);
12213        __tmp.put_f32_le(self.angular_velocity_z);
12214        __tmp.put_u16_le(self.flags.bits());
12215        __tmp.put_u8(self.target_system);
12216        __tmp.put_u8(self.target_component);
12217        if matches!(version, MavlinkVersion::V2) {
12218            let len = __tmp.len();
12219            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12220        } else {
12221            __tmp.len()
12222        }
12223    }
12224}
12225#[doc = "id: 280"]
12226#[doc = "Information about a high level gimbal manager. This message should be requested by a ground station using MAV_CMD_REQUEST_MESSAGE."]
12227#[derive(Debug, Clone, PartialEq)]
12228#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12229#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12230pub struct GIMBAL_MANAGER_INFORMATION_DATA {
12231    #[doc = "Timestamp (time since system boot)."]
12232    pub time_boot_ms: u32,
12233    #[doc = "Bitmap of gimbal capability flags."]
12234    pub cap_flags: GimbalManagerCapFlags,
12235    #[doc = "Minimum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12236    pub roll_min: f32,
12237    #[doc = "Maximum hardware roll angle (positive: rolling to the right, negative: rolling to the left)"]
12238    pub roll_max: f32,
12239    #[doc = "Minimum pitch angle (positive: up, negative: down)"]
12240    pub pitch_min: f32,
12241    #[doc = "Maximum pitch angle (positive: up, negative: down)"]
12242    pub pitch_max: f32,
12243    #[doc = "Minimum yaw angle (positive: to the right, negative: to the left)"]
12244    pub yaw_min: f32,
12245    #[doc = "Maximum yaw angle (positive: to the right, negative: to the left)"]
12246    pub yaw_max: f32,
12247    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12248    pub gimbal_device_id: u8,
12249}
12250impl GIMBAL_MANAGER_INFORMATION_DATA {
12251    pub const ENCODED_LEN: usize = 33usize;
12252    pub const DEFAULT: Self = Self {
12253        time_boot_ms: 0_u32,
12254        cap_flags: GimbalManagerCapFlags::DEFAULT,
12255        roll_min: 0.0_f32,
12256        roll_max: 0.0_f32,
12257        pitch_min: 0.0_f32,
12258        pitch_max: 0.0_f32,
12259        yaw_min: 0.0_f32,
12260        yaw_max: 0.0_f32,
12261        gimbal_device_id: 0_u8,
12262    };
12263    #[cfg(feature = "arbitrary")]
12264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12265        use arbitrary::{Arbitrary, Unstructured};
12266        let mut buf = [0u8; 1024];
12267        rng.fill_bytes(&mut buf);
12268        let mut unstructured = Unstructured::new(&buf);
12269        Self::arbitrary(&mut unstructured).unwrap_or_default()
12270    }
12271}
12272impl Default for GIMBAL_MANAGER_INFORMATION_DATA {
12273    fn default() -> Self {
12274        Self::DEFAULT.clone()
12275    }
12276}
12277impl MessageData for GIMBAL_MANAGER_INFORMATION_DATA {
12278    type Message = MavMessage;
12279    const ID: u32 = 280u32;
12280    const NAME: &'static str = "GIMBAL_MANAGER_INFORMATION";
12281    const EXTRA_CRC: u8 = 70u8;
12282    const ENCODED_LEN: usize = 33usize;
12283    fn deser(
12284        _version: MavlinkVersion,
12285        __input: &[u8],
12286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12287        let avail_len = __input.len();
12288        let mut payload_buf = [0; Self::ENCODED_LEN];
12289        let mut buf = if avail_len < Self::ENCODED_LEN {
12290            payload_buf[0..avail_len].copy_from_slice(__input);
12291            Bytes::new(&payload_buf)
12292        } else {
12293            Bytes::new(__input)
12294        };
12295        let mut __struct = Self::default();
12296        __struct.time_boot_ms = buf.get_u32_le();
12297        let tmp = buf.get_u32_le();
12298        __struct.cap_flags = GimbalManagerCapFlags::from_bits(
12299            tmp & GimbalManagerCapFlags::all().bits(),
12300        )
12301        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12302            flag_type: "GimbalManagerCapFlags",
12303            value: tmp as u32,
12304        })?;
12305        __struct.roll_min = buf.get_f32_le();
12306        __struct.roll_max = buf.get_f32_le();
12307        __struct.pitch_min = buf.get_f32_le();
12308        __struct.pitch_max = buf.get_f32_le();
12309        __struct.yaw_min = buf.get_f32_le();
12310        __struct.yaw_max = buf.get_f32_le();
12311        __struct.gimbal_device_id = buf.get_u8();
12312        Ok(__struct)
12313    }
12314    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12315        let mut __tmp = BytesMut::new(bytes);
12316        #[allow(clippy::absurd_extreme_comparisons)]
12317        #[allow(unused_comparisons)]
12318        if __tmp.remaining() < Self::ENCODED_LEN {
12319            panic!(
12320                "buffer is too small (need {} bytes, but got {})",
12321                Self::ENCODED_LEN,
12322                __tmp.remaining(),
12323            )
12324        }
12325        __tmp.put_u32_le(self.time_boot_ms);
12326        __tmp.put_u32_le(self.cap_flags.bits());
12327        __tmp.put_f32_le(self.roll_min);
12328        __tmp.put_f32_le(self.roll_max);
12329        __tmp.put_f32_le(self.pitch_min);
12330        __tmp.put_f32_le(self.pitch_max);
12331        __tmp.put_f32_le(self.yaw_min);
12332        __tmp.put_f32_le(self.yaw_max);
12333        __tmp.put_u8(self.gimbal_device_id);
12334        if matches!(version, MavlinkVersion::V2) {
12335            let len = __tmp.len();
12336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12337        } else {
12338            __tmp.len()
12339        }
12340    }
12341}
12342#[doc = "id: 282"]
12343#[doc = "High level message to control a gimbal's attitude. This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12344#[derive(Debug, Clone, PartialEq)]
12345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12347pub struct GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12348    #[doc = "High level gimbal manager flags to use."]
12349    pub flags: GimbalManagerFlags,
12350    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation, the frame is depends on whether the flag GIMBAL_MANAGER_FLAGS_YAW_LOCK is set)"]
12351    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12352    pub q: [f32; 4],
12353    #[doc = "X component of angular velocity, positive is rolling to the right, NaN to be ignored."]
12354    pub angular_velocity_x: f32,
12355    #[doc = "Y component of angular velocity, positive is pitching up, NaN to be ignored."]
12356    pub angular_velocity_y: f32,
12357    #[doc = "Z component of angular velocity, positive is yawing to the right, NaN to be ignored."]
12358    pub angular_velocity_z: f32,
12359    #[doc = "System ID"]
12360    pub target_system: u8,
12361    #[doc = "Component ID"]
12362    pub target_component: u8,
12363    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12364    pub gimbal_device_id: u8,
12365}
12366impl GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12367    pub const ENCODED_LEN: usize = 35usize;
12368    pub const DEFAULT: Self = Self {
12369        flags: GimbalManagerFlags::DEFAULT,
12370        q: [0.0_f32; 4usize],
12371        angular_velocity_x: 0.0_f32,
12372        angular_velocity_y: 0.0_f32,
12373        angular_velocity_z: 0.0_f32,
12374        target_system: 0_u8,
12375        target_component: 0_u8,
12376        gimbal_device_id: 0_u8,
12377    };
12378    #[cfg(feature = "arbitrary")]
12379    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12380        use arbitrary::{Arbitrary, Unstructured};
12381        let mut buf = [0u8; 1024];
12382        rng.fill_bytes(&mut buf);
12383        let mut unstructured = Unstructured::new(&buf);
12384        Self::arbitrary(&mut unstructured).unwrap_or_default()
12385    }
12386}
12387impl Default for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12388    fn default() -> Self {
12389        Self::DEFAULT.clone()
12390    }
12391}
12392impl MessageData for GIMBAL_MANAGER_SET_ATTITUDE_DATA {
12393    type Message = MavMessage;
12394    const ID: u32 = 282u32;
12395    const NAME: &'static str = "GIMBAL_MANAGER_SET_ATTITUDE";
12396    const EXTRA_CRC: u8 = 123u8;
12397    const ENCODED_LEN: usize = 35usize;
12398    fn deser(
12399        _version: MavlinkVersion,
12400        __input: &[u8],
12401    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12402        let avail_len = __input.len();
12403        let mut payload_buf = [0; Self::ENCODED_LEN];
12404        let mut buf = if avail_len < Self::ENCODED_LEN {
12405            payload_buf[0..avail_len].copy_from_slice(__input);
12406            Bytes::new(&payload_buf)
12407        } else {
12408            Bytes::new(__input)
12409        };
12410        let mut __struct = Self::default();
12411        let tmp = buf.get_u32_le();
12412        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12413            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12414                flag_type: "GimbalManagerFlags",
12415                value: tmp as u32,
12416            })?;
12417        for v in &mut __struct.q {
12418            let val = buf.get_f32_le();
12419            *v = val;
12420        }
12421        __struct.angular_velocity_x = buf.get_f32_le();
12422        __struct.angular_velocity_y = buf.get_f32_le();
12423        __struct.angular_velocity_z = buf.get_f32_le();
12424        __struct.target_system = buf.get_u8();
12425        __struct.target_component = buf.get_u8();
12426        __struct.gimbal_device_id = buf.get_u8();
12427        Ok(__struct)
12428    }
12429    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12430        let mut __tmp = BytesMut::new(bytes);
12431        #[allow(clippy::absurd_extreme_comparisons)]
12432        #[allow(unused_comparisons)]
12433        if __tmp.remaining() < Self::ENCODED_LEN {
12434            panic!(
12435                "buffer is too small (need {} bytes, but got {})",
12436                Self::ENCODED_LEN,
12437                __tmp.remaining(),
12438            )
12439        }
12440        __tmp.put_u32_le(self.flags.bits());
12441        for val in &self.q {
12442            __tmp.put_f32_le(*val);
12443        }
12444        __tmp.put_f32_le(self.angular_velocity_x);
12445        __tmp.put_f32_le(self.angular_velocity_y);
12446        __tmp.put_f32_le(self.angular_velocity_z);
12447        __tmp.put_u8(self.target_system);
12448        __tmp.put_u8(self.target_component);
12449        __tmp.put_u8(self.gimbal_device_id);
12450        if matches!(version, MavlinkVersion::V2) {
12451            let len = __tmp.len();
12452            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12453        } else {
12454            __tmp.len()
12455        }
12456    }
12457}
12458#[doc = "id: 288"]
12459#[doc = "High level message to control a gimbal manually. The angles or angular rates are unitless; the actual rates will depend on internal gimbal manager settings/configuration (e.g. set by parameters). This message is to be sent to the gimbal manager (e.g. from a ground station). Angles and rates can be set to NaN according to use case."]
12460#[derive(Debug, Clone, PartialEq)]
12461#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12462#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12463pub struct GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12464    #[doc = "High level gimbal manager flags."]
12465    pub flags: GimbalManagerFlags,
12466    #[doc = "Pitch angle unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12467    pub pitch: f32,
12468    #[doc = "Yaw angle unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12469    pub yaw: f32,
12470    #[doc = "Pitch angular rate unitless (-1..1, positive: up, negative: down, NaN to be ignored)."]
12471    pub pitch_rate: f32,
12472    #[doc = "Yaw angular rate unitless (-1..1, positive: to the right, negative: to the left, NaN to be ignored)."]
12473    pub yaw_rate: f32,
12474    #[doc = "System ID"]
12475    pub target_system: u8,
12476    #[doc = "Component ID"]
12477    pub target_component: u8,
12478    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12479    pub gimbal_device_id: u8,
12480}
12481impl GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12482    pub const ENCODED_LEN: usize = 23usize;
12483    pub const DEFAULT: Self = Self {
12484        flags: GimbalManagerFlags::DEFAULT,
12485        pitch: 0.0_f32,
12486        yaw: 0.0_f32,
12487        pitch_rate: 0.0_f32,
12488        yaw_rate: 0.0_f32,
12489        target_system: 0_u8,
12490        target_component: 0_u8,
12491        gimbal_device_id: 0_u8,
12492    };
12493    #[cfg(feature = "arbitrary")]
12494    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12495        use arbitrary::{Arbitrary, Unstructured};
12496        let mut buf = [0u8; 1024];
12497        rng.fill_bytes(&mut buf);
12498        let mut unstructured = Unstructured::new(&buf);
12499        Self::arbitrary(&mut unstructured).unwrap_or_default()
12500    }
12501}
12502impl Default for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12503    fn default() -> Self {
12504        Self::DEFAULT.clone()
12505    }
12506}
12507impl MessageData for GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA {
12508    type Message = MavMessage;
12509    const ID: u32 = 288u32;
12510    const NAME: &'static str = "GIMBAL_MANAGER_SET_MANUAL_CONTROL";
12511    const EXTRA_CRC: u8 = 20u8;
12512    const ENCODED_LEN: usize = 23usize;
12513    fn deser(
12514        _version: MavlinkVersion,
12515        __input: &[u8],
12516    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12517        let avail_len = __input.len();
12518        let mut payload_buf = [0; Self::ENCODED_LEN];
12519        let mut buf = if avail_len < Self::ENCODED_LEN {
12520            payload_buf[0..avail_len].copy_from_slice(__input);
12521            Bytes::new(&payload_buf)
12522        } else {
12523            Bytes::new(__input)
12524        };
12525        let mut __struct = Self::default();
12526        let tmp = buf.get_u32_le();
12527        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12528            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12529                flag_type: "GimbalManagerFlags",
12530                value: tmp as u32,
12531            })?;
12532        __struct.pitch = buf.get_f32_le();
12533        __struct.yaw = buf.get_f32_le();
12534        __struct.pitch_rate = buf.get_f32_le();
12535        __struct.yaw_rate = buf.get_f32_le();
12536        __struct.target_system = buf.get_u8();
12537        __struct.target_component = buf.get_u8();
12538        __struct.gimbal_device_id = buf.get_u8();
12539        Ok(__struct)
12540    }
12541    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12542        let mut __tmp = BytesMut::new(bytes);
12543        #[allow(clippy::absurd_extreme_comparisons)]
12544        #[allow(unused_comparisons)]
12545        if __tmp.remaining() < Self::ENCODED_LEN {
12546            panic!(
12547                "buffer is too small (need {} bytes, but got {})",
12548                Self::ENCODED_LEN,
12549                __tmp.remaining(),
12550            )
12551        }
12552        __tmp.put_u32_le(self.flags.bits());
12553        __tmp.put_f32_le(self.pitch);
12554        __tmp.put_f32_le(self.yaw);
12555        __tmp.put_f32_le(self.pitch_rate);
12556        __tmp.put_f32_le(self.yaw_rate);
12557        __tmp.put_u8(self.target_system);
12558        __tmp.put_u8(self.target_component);
12559        __tmp.put_u8(self.gimbal_device_id);
12560        if matches!(version, MavlinkVersion::V2) {
12561            let len = __tmp.len();
12562            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12563        } else {
12564            __tmp.len()
12565        }
12566    }
12567}
12568#[doc = "id: 287"]
12569#[doc = "Set gimbal manager pitch and yaw angles (high rate message). This message is to be sent to the gimbal manager (e.g. from a ground station) and will be ignored by gimbal devices. Angles and rates can be set to NaN according to use case. Use MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW for low-rate adjustments that require confirmation."]
12570#[derive(Debug, Clone, PartialEq)]
12571#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12572#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12573pub struct GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12574    #[doc = "High level gimbal manager flags to use."]
12575    pub flags: GimbalManagerFlags,
12576    #[doc = "Pitch angle (positive: up, negative: down, NaN to be ignored)."]
12577    pub pitch: f32,
12578    #[doc = "Yaw angle (positive: to the right, negative: to the left, NaN to be ignored)."]
12579    pub yaw: f32,
12580    #[doc = "Pitch angular rate (positive: up, negative: down, NaN to be ignored)."]
12581    pub pitch_rate: f32,
12582    #[doc = "Yaw angular rate (positive: to the right, negative: to the left, NaN to be ignored)."]
12583    pub yaw_rate: f32,
12584    #[doc = "System ID"]
12585    pub target_system: u8,
12586    #[doc = "Component ID"]
12587    pub target_component: u8,
12588    #[doc = "Component ID of gimbal device to address (or 1-6 for non-MAVLink gimbal), 0 for all gimbal device components. Send command multiple times for more than one gimbal (but not all gimbals)."]
12589    pub gimbal_device_id: u8,
12590}
12591impl GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12592    pub const ENCODED_LEN: usize = 23usize;
12593    pub const DEFAULT: Self = Self {
12594        flags: GimbalManagerFlags::DEFAULT,
12595        pitch: 0.0_f32,
12596        yaw: 0.0_f32,
12597        pitch_rate: 0.0_f32,
12598        yaw_rate: 0.0_f32,
12599        target_system: 0_u8,
12600        target_component: 0_u8,
12601        gimbal_device_id: 0_u8,
12602    };
12603    #[cfg(feature = "arbitrary")]
12604    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12605        use arbitrary::{Arbitrary, Unstructured};
12606        let mut buf = [0u8; 1024];
12607        rng.fill_bytes(&mut buf);
12608        let mut unstructured = Unstructured::new(&buf);
12609        Self::arbitrary(&mut unstructured).unwrap_or_default()
12610    }
12611}
12612impl Default for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12613    fn default() -> Self {
12614        Self::DEFAULT.clone()
12615    }
12616}
12617impl MessageData for GIMBAL_MANAGER_SET_PITCHYAW_DATA {
12618    type Message = MavMessage;
12619    const ID: u32 = 287u32;
12620    const NAME: &'static str = "GIMBAL_MANAGER_SET_PITCHYAW";
12621    const EXTRA_CRC: u8 = 1u8;
12622    const ENCODED_LEN: usize = 23usize;
12623    fn deser(
12624        _version: MavlinkVersion,
12625        __input: &[u8],
12626    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12627        let avail_len = __input.len();
12628        let mut payload_buf = [0; Self::ENCODED_LEN];
12629        let mut buf = if avail_len < Self::ENCODED_LEN {
12630            payload_buf[0..avail_len].copy_from_slice(__input);
12631            Bytes::new(&payload_buf)
12632        } else {
12633            Bytes::new(__input)
12634        };
12635        let mut __struct = Self::default();
12636        let tmp = buf.get_u32_le();
12637        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12638            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12639                flag_type: "GimbalManagerFlags",
12640                value: tmp as u32,
12641            })?;
12642        __struct.pitch = buf.get_f32_le();
12643        __struct.yaw = buf.get_f32_le();
12644        __struct.pitch_rate = buf.get_f32_le();
12645        __struct.yaw_rate = buf.get_f32_le();
12646        __struct.target_system = buf.get_u8();
12647        __struct.target_component = buf.get_u8();
12648        __struct.gimbal_device_id = buf.get_u8();
12649        Ok(__struct)
12650    }
12651    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12652        let mut __tmp = BytesMut::new(bytes);
12653        #[allow(clippy::absurd_extreme_comparisons)]
12654        #[allow(unused_comparisons)]
12655        if __tmp.remaining() < Self::ENCODED_LEN {
12656            panic!(
12657                "buffer is too small (need {} bytes, but got {})",
12658                Self::ENCODED_LEN,
12659                __tmp.remaining(),
12660            )
12661        }
12662        __tmp.put_u32_le(self.flags.bits());
12663        __tmp.put_f32_le(self.pitch);
12664        __tmp.put_f32_le(self.yaw);
12665        __tmp.put_f32_le(self.pitch_rate);
12666        __tmp.put_f32_le(self.yaw_rate);
12667        __tmp.put_u8(self.target_system);
12668        __tmp.put_u8(self.target_component);
12669        __tmp.put_u8(self.gimbal_device_id);
12670        if matches!(version, MavlinkVersion::V2) {
12671            let len = __tmp.len();
12672            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12673        } else {
12674            __tmp.len()
12675        }
12676    }
12677}
12678#[doc = "id: 281"]
12679#[doc = "Current status about a high level gimbal manager. This message should be broadcast at a low regular rate (e.g. 5Hz)."]
12680#[derive(Debug, Clone, PartialEq)]
12681#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12682#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12683pub struct GIMBAL_MANAGER_STATUS_DATA {
12684    #[doc = "Timestamp (time since system boot)."]
12685    pub time_boot_ms: u32,
12686    #[doc = "High level gimbal manager flags currently applied."]
12687    pub flags: GimbalManagerFlags,
12688    #[doc = "Gimbal device ID that this gimbal manager is responsible for. Component ID of gimbal device (or 1-6 for non-MAVLink gimbal)."]
12689    pub gimbal_device_id: u8,
12690    #[doc = "System ID of MAVLink component with primary control, 0 for none."]
12691    pub primary_control_sysid: u8,
12692    #[doc = "Component ID of MAVLink component with primary control, 0 for none."]
12693    pub primary_control_compid: u8,
12694    #[doc = "System ID of MAVLink component with secondary control, 0 for none."]
12695    pub secondary_control_sysid: u8,
12696    #[doc = "Component ID of MAVLink component with secondary control, 0 for none."]
12697    pub secondary_control_compid: u8,
12698}
12699impl GIMBAL_MANAGER_STATUS_DATA {
12700    pub const ENCODED_LEN: usize = 13usize;
12701    pub const DEFAULT: Self = Self {
12702        time_boot_ms: 0_u32,
12703        flags: GimbalManagerFlags::DEFAULT,
12704        gimbal_device_id: 0_u8,
12705        primary_control_sysid: 0_u8,
12706        primary_control_compid: 0_u8,
12707        secondary_control_sysid: 0_u8,
12708        secondary_control_compid: 0_u8,
12709    };
12710    #[cfg(feature = "arbitrary")]
12711    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12712        use arbitrary::{Arbitrary, Unstructured};
12713        let mut buf = [0u8; 1024];
12714        rng.fill_bytes(&mut buf);
12715        let mut unstructured = Unstructured::new(&buf);
12716        Self::arbitrary(&mut unstructured).unwrap_or_default()
12717    }
12718}
12719impl Default for GIMBAL_MANAGER_STATUS_DATA {
12720    fn default() -> Self {
12721        Self::DEFAULT.clone()
12722    }
12723}
12724impl MessageData for GIMBAL_MANAGER_STATUS_DATA {
12725    type Message = MavMessage;
12726    const ID: u32 = 281u32;
12727    const NAME: &'static str = "GIMBAL_MANAGER_STATUS";
12728    const EXTRA_CRC: u8 = 48u8;
12729    const ENCODED_LEN: usize = 13usize;
12730    fn deser(
12731        _version: MavlinkVersion,
12732        __input: &[u8],
12733    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12734        let avail_len = __input.len();
12735        let mut payload_buf = [0; Self::ENCODED_LEN];
12736        let mut buf = if avail_len < Self::ENCODED_LEN {
12737            payload_buf[0..avail_len].copy_from_slice(__input);
12738            Bytes::new(&payload_buf)
12739        } else {
12740            Bytes::new(__input)
12741        };
12742        let mut __struct = Self::default();
12743        __struct.time_boot_ms = buf.get_u32_le();
12744        let tmp = buf.get_u32_le();
12745        __struct.flags = GimbalManagerFlags::from_bits(tmp & GimbalManagerFlags::all().bits())
12746            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
12747                flag_type: "GimbalManagerFlags",
12748                value: tmp as u32,
12749            })?;
12750        __struct.gimbal_device_id = buf.get_u8();
12751        __struct.primary_control_sysid = buf.get_u8();
12752        __struct.primary_control_compid = buf.get_u8();
12753        __struct.secondary_control_sysid = buf.get_u8();
12754        __struct.secondary_control_compid = buf.get_u8();
12755        Ok(__struct)
12756    }
12757    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12758        let mut __tmp = BytesMut::new(bytes);
12759        #[allow(clippy::absurd_extreme_comparisons)]
12760        #[allow(unused_comparisons)]
12761        if __tmp.remaining() < Self::ENCODED_LEN {
12762            panic!(
12763                "buffer is too small (need {} bytes, but got {})",
12764                Self::ENCODED_LEN,
12765                __tmp.remaining(),
12766            )
12767        }
12768        __tmp.put_u32_le(self.time_boot_ms);
12769        __tmp.put_u32_le(self.flags.bits());
12770        __tmp.put_u8(self.gimbal_device_id);
12771        __tmp.put_u8(self.primary_control_sysid);
12772        __tmp.put_u8(self.primary_control_compid);
12773        __tmp.put_u8(self.secondary_control_sysid);
12774        __tmp.put_u8(self.secondary_control_compid);
12775        if matches!(version, MavlinkVersion::V2) {
12776            let len = __tmp.len();
12777            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12778        } else {
12779            __tmp.len()
12780        }
12781    }
12782}
12783#[doc = "id: 33"]
12784#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It                is designed as scaled integer message since the resolution of float is not sufficient."]
12785#[derive(Debug, Clone, PartialEq)]
12786#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12787#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12788pub struct GLOBAL_POSITION_INT_DATA {
12789    #[doc = "Timestamp (time since system boot)."]
12790    pub time_boot_ms: u32,
12791    #[doc = "Latitude, expressed"]
12792    pub lat: i32,
12793    #[doc = "Longitude, expressed"]
12794    pub lon: i32,
12795    #[doc = "Altitude (MSL). Note that virtually all GPS modules provide both WGS84 and MSL."]
12796    pub alt: i32,
12797    #[doc = "Altitude above home"]
12798    pub relative_alt: i32,
12799    #[doc = "Ground X Speed (Latitude, positive north)"]
12800    pub vx: i16,
12801    #[doc = "Ground Y Speed (Longitude, positive east)"]
12802    pub vy: i16,
12803    #[doc = "Ground Z Speed (Altitude, positive down)"]
12804    pub vz: i16,
12805    #[doc = "Vehicle heading (yaw angle), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
12806    pub hdg: u16,
12807}
12808impl GLOBAL_POSITION_INT_DATA {
12809    pub const ENCODED_LEN: usize = 28usize;
12810    pub const DEFAULT: Self = Self {
12811        time_boot_ms: 0_u32,
12812        lat: 0_i32,
12813        lon: 0_i32,
12814        alt: 0_i32,
12815        relative_alt: 0_i32,
12816        vx: 0_i16,
12817        vy: 0_i16,
12818        vz: 0_i16,
12819        hdg: 0_u16,
12820    };
12821    #[cfg(feature = "arbitrary")]
12822    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12823        use arbitrary::{Arbitrary, Unstructured};
12824        let mut buf = [0u8; 1024];
12825        rng.fill_bytes(&mut buf);
12826        let mut unstructured = Unstructured::new(&buf);
12827        Self::arbitrary(&mut unstructured).unwrap_or_default()
12828    }
12829}
12830impl Default for GLOBAL_POSITION_INT_DATA {
12831    fn default() -> Self {
12832        Self::DEFAULT.clone()
12833    }
12834}
12835impl MessageData for GLOBAL_POSITION_INT_DATA {
12836    type Message = MavMessage;
12837    const ID: u32 = 33u32;
12838    const NAME: &'static str = "GLOBAL_POSITION_INT";
12839    const EXTRA_CRC: u8 = 104u8;
12840    const ENCODED_LEN: usize = 28usize;
12841    fn deser(
12842        _version: MavlinkVersion,
12843        __input: &[u8],
12844    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12845        let avail_len = __input.len();
12846        let mut payload_buf = [0; Self::ENCODED_LEN];
12847        let mut buf = if avail_len < Self::ENCODED_LEN {
12848            payload_buf[0..avail_len].copy_from_slice(__input);
12849            Bytes::new(&payload_buf)
12850        } else {
12851            Bytes::new(__input)
12852        };
12853        let mut __struct = Self::default();
12854        __struct.time_boot_ms = buf.get_u32_le();
12855        __struct.lat = buf.get_i32_le();
12856        __struct.lon = buf.get_i32_le();
12857        __struct.alt = buf.get_i32_le();
12858        __struct.relative_alt = buf.get_i32_le();
12859        __struct.vx = buf.get_i16_le();
12860        __struct.vy = buf.get_i16_le();
12861        __struct.vz = buf.get_i16_le();
12862        __struct.hdg = buf.get_u16_le();
12863        Ok(__struct)
12864    }
12865    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12866        let mut __tmp = BytesMut::new(bytes);
12867        #[allow(clippy::absurd_extreme_comparisons)]
12868        #[allow(unused_comparisons)]
12869        if __tmp.remaining() < Self::ENCODED_LEN {
12870            panic!(
12871                "buffer is too small (need {} bytes, but got {})",
12872                Self::ENCODED_LEN,
12873                __tmp.remaining(),
12874            )
12875        }
12876        __tmp.put_u32_le(self.time_boot_ms);
12877        __tmp.put_i32_le(self.lat);
12878        __tmp.put_i32_le(self.lon);
12879        __tmp.put_i32_le(self.alt);
12880        __tmp.put_i32_le(self.relative_alt);
12881        __tmp.put_i16_le(self.vx);
12882        __tmp.put_i16_le(self.vy);
12883        __tmp.put_i16_le(self.vz);
12884        __tmp.put_u16_le(self.hdg);
12885        if matches!(version, MavlinkVersion::V2) {
12886            let len = __tmp.len();
12887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
12888        } else {
12889            __tmp.len()
12890        }
12891    }
12892}
12893#[doc = "id: 63"]
12894#[doc = "The filtered global position (e.g. fused GPS and accelerometers). The position is in GPS-frame (right-handed, Z-up). It  is designed as scaled integer message since the resolution of float is not sufficient. NOTE: This message is intended for onboard networks / companion computers and higher-bandwidth links and optimized for accuracy and completeness. Please use the GLOBAL_POSITION_INT message for a minimal subset."]
12895#[derive(Debug, Clone, PartialEq)]
12896#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
12897#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
12898pub struct GLOBAL_POSITION_INT_COV_DATA {
12899    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
12900    pub time_usec: u64,
12901    #[doc = "Latitude"]
12902    pub lat: i32,
12903    #[doc = "Longitude"]
12904    pub lon: i32,
12905    #[doc = "Altitude in meters above MSL"]
12906    pub alt: i32,
12907    #[doc = "Altitude above ground"]
12908    pub relative_alt: i32,
12909    #[doc = "Ground X Speed (Latitude)"]
12910    pub vx: f32,
12911    #[doc = "Ground Y Speed (Longitude)"]
12912    pub vy: f32,
12913    #[doc = "Ground Z Speed (Altitude)"]
12914    pub vz: f32,
12915    #[doc = "Row-major representation of a 6x6 position and velocity 6x6 cross-covariance matrix (states: lat, lon, alt, vx, vy, vz; first six entries are the first ROW, next six entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
12916    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
12917    pub covariance: [f32; 36],
12918    #[doc = "Class id of the estimator this estimate originated from."]
12919    pub estimator_type: MavEstimatorType,
12920}
12921impl GLOBAL_POSITION_INT_COV_DATA {
12922    pub const ENCODED_LEN: usize = 181usize;
12923    pub const DEFAULT: Self = Self {
12924        time_usec: 0_u64,
12925        lat: 0_i32,
12926        lon: 0_i32,
12927        alt: 0_i32,
12928        relative_alt: 0_i32,
12929        vx: 0.0_f32,
12930        vy: 0.0_f32,
12931        vz: 0.0_f32,
12932        covariance: [0.0_f32; 36usize],
12933        estimator_type: MavEstimatorType::DEFAULT,
12934    };
12935    #[cfg(feature = "arbitrary")]
12936    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
12937        use arbitrary::{Arbitrary, Unstructured};
12938        let mut buf = [0u8; 1024];
12939        rng.fill_bytes(&mut buf);
12940        let mut unstructured = Unstructured::new(&buf);
12941        Self::arbitrary(&mut unstructured).unwrap_or_default()
12942    }
12943}
12944impl Default for GLOBAL_POSITION_INT_COV_DATA {
12945    fn default() -> Self {
12946        Self::DEFAULT.clone()
12947    }
12948}
12949impl MessageData for GLOBAL_POSITION_INT_COV_DATA {
12950    type Message = MavMessage;
12951    const ID: u32 = 63u32;
12952    const NAME: &'static str = "GLOBAL_POSITION_INT_COV";
12953    const EXTRA_CRC: u8 = 119u8;
12954    const ENCODED_LEN: usize = 181usize;
12955    fn deser(
12956        _version: MavlinkVersion,
12957        __input: &[u8],
12958    ) -> Result<Self, ::mavlink_core::error::ParserError> {
12959        let avail_len = __input.len();
12960        let mut payload_buf = [0; Self::ENCODED_LEN];
12961        let mut buf = if avail_len < Self::ENCODED_LEN {
12962            payload_buf[0..avail_len].copy_from_slice(__input);
12963            Bytes::new(&payload_buf)
12964        } else {
12965            Bytes::new(__input)
12966        };
12967        let mut __struct = Self::default();
12968        __struct.time_usec = buf.get_u64_le();
12969        __struct.lat = buf.get_i32_le();
12970        __struct.lon = buf.get_i32_le();
12971        __struct.alt = buf.get_i32_le();
12972        __struct.relative_alt = buf.get_i32_le();
12973        __struct.vx = buf.get_f32_le();
12974        __struct.vy = buf.get_f32_le();
12975        __struct.vz = buf.get_f32_le();
12976        for v in &mut __struct.covariance {
12977            let val = buf.get_f32_le();
12978            *v = val;
12979        }
12980        let tmp = buf.get_u8();
12981        __struct.estimator_type =
12982            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
12983                enum_type: "MavEstimatorType",
12984                value: tmp as u32,
12985            })?;
12986        Ok(__struct)
12987    }
12988    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
12989        let mut __tmp = BytesMut::new(bytes);
12990        #[allow(clippy::absurd_extreme_comparisons)]
12991        #[allow(unused_comparisons)]
12992        if __tmp.remaining() < Self::ENCODED_LEN {
12993            panic!(
12994                "buffer is too small (need {} bytes, but got {})",
12995                Self::ENCODED_LEN,
12996                __tmp.remaining(),
12997            )
12998        }
12999        __tmp.put_u64_le(self.time_usec);
13000        __tmp.put_i32_le(self.lat);
13001        __tmp.put_i32_le(self.lon);
13002        __tmp.put_i32_le(self.alt);
13003        __tmp.put_i32_le(self.relative_alt);
13004        __tmp.put_f32_le(self.vx);
13005        __tmp.put_f32_le(self.vy);
13006        __tmp.put_f32_le(self.vz);
13007        for val in &self.covariance {
13008            __tmp.put_f32_le(*val);
13009        }
13010        __tmp.put_u8(self.estimator_type as u8);
13011        if matches!(version, MavlinkVersion::V2) {
13012            let len = __tmp.len();
13013            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13014        } else {
13015            __tmp.len()
13016        }
13017    }
13018}
13019#[doc = "id: 101"]
13020#[doc = "Global position/attitude estimate from a vision source."]
13021#[derive(Debug, Clone, PartialEq)]
13022#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13023#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13024pub struct GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13025    #[doc = "Timestamp (UNIX time or since system boot)"]
13026    pub usec: u64,
13027    #[doc = "Global X position"]
13028    pub x: f32,
13029    #[doc = "Global Y position"]
13030    pub y: f32,
13031    #[doc = "Global Z position"]
13032    pub z: f32,
13033    #[doc = "Roll angle"]
13034    pub roll: f32,
13035    #[doc = "Pitch angle"]
13036    pub pitch: f32,
13037    #[doc = "Yaw angle"]
13038    pub yaw: f32,
13039    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x_global, y_global, z_global, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
13040    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13041    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13042    pub covariance: [f32; 21],
13043    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
13044    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13045    pub reset_counter: u8,
13046}
13047impl GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13048    pub const ENCODED_LEN: usize = 117usize;
13049    pub const DEFAULT: Self = Self {
13050        usec: 0_u64,
13051        x: 0.0_f32,
13052        y: 0.0_f32,
13053        z: 0.0_f32,
13054        roll: 0.0_f32,
13055        pitch: 0.0_f32,
13056        yaw: 0.0_f32,
13057        covariance: [0.0_f32; 21usize],
13058        reset_counter: 0_u8,
13059    };
13060    #[cfg(feature = "arbitrary")]
13061    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13062        use arbitrary::{Arbitrary, Unstructured};
13063        let mut buf = [0u8; 1024];
13064        rng.fill_bytes(&mut buf);
13065        let mut unstructured = Unstructured::new(&buf);
13066        Self::arbitrary(&mut unstructured).unwrap_or_default()
13067    }
13068}
13069impl Default for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13070    fn default() -> Self {
13071        Self::DEFAULT.clone()
13072    }
13073}
13074impl MessageData for GLOBAL_VISION_POSITION_ESTIMATE_DATA {
13075    type Message = MavMessage;
13076    const ID: u32 = 101u32;
13077    const NAME: &'static str = "GLOBAL_VISION_POSITION_ESTIMATE";
13078    const EXTRA_CRC: u8 = 102u8;
13079    const ENCODED_LEN: usize = 117usize;
13080    fn deser(
13081        _version: MavlinkVersion,
13082        __input: &[u8],
13083    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13084        let avail_len = __input.len();
13085        let mut payload_buf = [0; Self::ENCODED_LEN];
13086        let mut buf = if avail_len < Self::ENCODED_LEN {
13087            payload_buf[0..avail_len].copy_from_slice(__input);
13088            Bytes::new(&payload_buf)
13089        } else {
13090            Bytes::new(__input)
13091        };
13092        let mut __struct = Self::default();
13093        __struct.usec = buf.get_u64_le();
13094        __struct.x = buf.get_f32_le();
13095        __struct.y = buf.get_f32_le();
13096        __struct.z = buf.get_f32_le();
13097        __struct.roll = buf.get_f32_le();
13098        __struct.pitch = buf.get_f32_le();
13099        __struct.yaw = buf.get_f32_le();
13100        for v in &mut __struct.covariance {
13101            let val = buf.get_f32_le();
13102            *v = val;
13103        }
13104        __struct.reset_counter = buf.get_u8();
13105        Ok(__struct)
13106    }
13107    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13108        let mut __tmp = BytesMut::new(bytes);
13109        #[allow(clippy::absurd_extreme_comparisons)]
13110        #[allow(unused_comparisons)]
13111        if __tmp.remaining() < Self::ENCODED_LEN {
13112            panic!(
13113                "buffer is too small (need {} bytes, but got {})",
13114                Self::ENCODED_LEN,
13115                __tmp.remaining(),
13116            )
13117        }
13118        __tmp.put_u64_le(self.usec);
13119        __tmp.put_f32_le(self.x);
13120        __tmp.put_f32_le(self.y);
13121        __tmp.put_f32_le(self.z);
13122        __tmp.put_f32_le(self.roll);
13123        __tmp.put_f32_le(self.pitch);
13124        __tmp.put_f32_le(self.yaw);
13125        for val in &self.covariance {
13126            __tmp.put_f32_le(*val);
13127        }
13128        __tmp.put_u8(self.reset_counter);
13129        if matches!(version, MavlinkVersion::V2) {
13130            let len = __tmp.len();
13131            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13132        } else {
13133            __tmp.len()
13134        }
13135    }
13136}
13137#[doc = "id: 124"]
13138#[doc = "Second GPS data."]
13139#[derive(Debug, Clone, PartialEq)]
13140#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13141#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13142pub struct GPS2_RAW_DATA {
13143    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13144    pub time_usec: u64,
13145    #[doc = "Latitude (WGS84)"]
13146    pub lat: i32,
13147    #[doc = "Longitude (WGS84)"]
13148    pub lon: i32,
13149    #[doc = "Altitude (MSL). Positive for up."]
13150    pub alt: i32,
13151    #[doc = "Age of DGPS info"]
13152    pub dgps_age: u32,
13153    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13154    pub eph: u16,
13155    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13156    pub epv: u16,
13157    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13158    pub vel: u16,
13159    #[doc = "Course over ground (NOT heading, but direction of movement): 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13160    pub cog: u16,
13161    #[doc = "GPS fix type."]
13162    pub fix_type: GpsFixType,
13163    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13164    pub satellites_visible: u8,
13165    #[doc = "Number of DGPS satellites"]
13166    pub dgps_numch: u8,
13167    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13168    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13169    pub yaw: u16,
13170    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13171    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13172    pub alt_ellipsoid: i32,
13173    #[doc = "Position uncertainty."]
13174    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13175    pub h_acc: u32,
13176    #[doc = "Altitude uncertainty."]
13177    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13178    pub v_acc: u32,
13179    #[doc = "Speed uncertainty."]
13180    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13181    pub vel_acc: u32,
13182    #[doc = "Heading / track uncertainty"]
13183    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13184    pub hdg_acc: u32,
13185}
13186impl GPS2_RAW_DATA {
13187    pub const ENCODED_LEN: usize = 57usize;
13188    pub const DEFAULT: Self = Self {
13189        time_usec: 0_u64,
13190        lat: 0_i32,
13191        lon: 0_i32,
13192        alt: 0_i32,
13193        dgps_age: 0_u32,
13194        eph: 0_u16,
13195        epv: 0_u16,
13196        vel: 0_u16,
13197        cog: 0_u16,
13198        fix_type: GpsFixType::DEFAULT,
13199        satellites_visible: 0_u8,
13200        dgps_numch: 0_u8,
13201        yaw: 0_u16,
13202        alt_ellipsoid: 0_i32,
13203        h_acc: 0_u32,
13204        v_acc: 0_u32,
13205        vel_acc: 0_u32,
13206        hdg_acc: 0_u32,
13207    };
13208    #[cfg(feature = "arbitrary")]
13209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13210        use arbitrary::{Arbitrary, Unstructured};
13211        let mut buf = [0u8; 1024];
13212        rng.fill_bytes(&mut buf);
13213        let mut unstructured = Unstructured::new(&buf);
13214        Self::arbitrary(&mut unstructured).unwrap_or_default()
13215    }
13216}
13217impl Default for GPS2_RAW_DATA {
13218    fn default() -> Self {
13219        Self::DEFAULT.clone()
13220    }
13221}
13222impl MessageData for GPS2_RAW_DATA {
13223    type Message = MavMessage;
13224    const ID: u32 = 124u32;
13225    const NAME: &'static str = "GPS2_RAW";
13226    const EXTRA_CRC: u8 = 87u8;
13227    const ENCODED_LEN: usize = 57usize;
13228    fn deser(
13229        _version: MavlinkVersion,
13230        __input: &[u8],
13231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13232        let avail_len = __input.len();
13233        let mut payload_buf = [0; Self::ENCODED_LEN];
13234        let mut buf = if avail_len < Self::ENCODED_LEN {
13235            payload_buf[0..avail_len].copy_from_slice(__input);
13236            Bytes::new(&payload_buf)
13237        } else {
13238            Bytes::new(__input)
13239        };
13240        let mut __struct = Self::default();
13241        __struct.time_usec = buf.get_u64_le();
13242        __struct.lat = buf.get_i32_le();
13243        __struct.lon = buf.get_i32_le();
13244        __struct.alt = buf.get_i32_le();
13245        __struct.dgps_age = buf.get_u32_le();
13246        __struct.eph = buf.get_u16_le();
13247        __struct.epv = buf.get_u16_le();
13248        __struct.vel = buf.get_u16_le();
13249        __struct.cog = buf.get_u16_le();
13250        let tmp = buf.get_u8();
13251        __struct.fix_type =
13252            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13253                enum_type: "GpsFixType",
13254                value: tmp as u32,
13255            })?;
13256        __struct.satellites_visible = buf.get_u8();
13257        __struct.dgps_numch = buf.get_u8();
13258        __struct.yaw = buf.get_u16_le();
13259        __struct.alt_ellipsoid = buf.get_i32_le();
13260        __struct.h_acc = buf.get_u32_le();
13261        __struct.v_acc = buf.get_u32_le();
13262        __struct.vel_acc = buf.get_u32_le();
13263        __struct.hdg_acc = buf.get_u32_le();
13264        Ok(__struct)
13265    }
13266    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13267        let mut __tmp = BytesMut::new(bytes);
13268        #[allow(clippy::absurd_extreme_comparisons)]
13269        #[allow(unused_comparisons)]
13270        if __tmp.remaining() < Self::ENCODED_LEN {
13271            panic!(
13272                "buffer is too small (need {} bytes, but got {})",
13273                Self::ENCODED_LEN,
13274                __tmp.remaining(),
13275            )
13276        }
13277        __tmp.put_u64_le(self.time_usec);
13278        __tmp.put_i32_le(self.lat);
13279        __tmp.put_i32_le(self.lon);
13280        __tmp.put_i32_le(self.alt);
13281        __tmp.put_u32_le(self.dgps_age);
13282        __tmp.put_u16_le(self.eph);
13283        __tmp.put_u16_le(self.epv);
13284        __tmp.put_u16_le(self.vel);
13285        __tmp.put_u16_le(self.cog);
13286        __tmp.put_u8(self.fix_type as u8);
13287        __tmp.put_u8(self.satellites_visible);
13288        __tmp.put_u8(self.dgps_numch);
13289        __tmp.put_u16_le(self.yaw);
13290        __tmp.put_i32_le(self.alt_ellipsoid);
13291        __tmp.put_u32_le(self.h_acc);
13292        __tmp.put_u32_le(self.v_acc);
13293        __tmp.put_u32_le(self.vel_acc);
13294        __tmp.put_u32_le(self.hdg_acc);
13295        if matches!(version, MavlinkVersion::V2) {
13296            let len = __tmp.len();
13297            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13298        } else {
13299            __tmp.len()
13300        }
13301    }
13302}
13303#[doc = "id: 128"]
13304#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
13305#[derive(Debug, Clone, PartialEq)]
13306#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13307#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13308pub struct GPS2_RTK_DATA {
13309    #[doc = "Time since boot of last baseline message received."]
13310    pub time_last_baseline_ms: u32,
13311    #[doc = "GPS Time of Week of last baseline"]
13312    pub tow: u32,
13313    #[doc = "Current baseline in ECEF x or NED north component."]
13314    pub baseline_a_mm: i32,
13315    #[doc = "Current baseline in ECEF y or NED east component."]
13316    pub baseline_b_mm: i32,
13317    #[doc = "Current baseline in ECEF z or NED down component."]
13318    pub baseline_c_mm: i32,
13319    #[doc = "Current estimate of baseline accuracy."]
13320    pub accuracy: u32,
13321    #[doc = "Current number of integer ambiguity hypotheses."]
13322    pub iar_num_hypotheses: i32,
13323    #[doc = "GPS Week Number of last baseline"]
13324    pub wn: u16,
13325    #[doc = "Identification of connected RTK receiver."]
13326    pub rtk_receiver_id: u8,
13327    #[doc = "GPS-specific health report for RTK data."]
13328    pub rtk_health: u8,
13329    #[doc = "Rate of baseline messages being received by GPS"]
13330    pub rtk_rate: u8,
13331    #[doc = "Current number of sats used for RTK calculation."]
13332    pub nsats: u8,
13333    #[doc = "Coordinate system of baseline"]
13334    pub baseline_coords_type: RtkBaselineCoordinateSystem,
13335}
13336impl GPS2_RTK_DATA {
13337    pub const ENCODED_LEN: usize = 35usize;
13338    pub const DEFAULT: Self = Self {
13339        time_last_baseline_ms: 0_u32,
13340        tow: 0_u32,
13341        baseline_a_mm: 0_i32,
13342        baseline_b_mm: 0_i32,
13343        baseline_c_mm: 0_i32,
13344        accuracy: 0_u32,
13345        iar_num_hypotheses: 0_i32,
13346        wn: 0_u16,
13347        rtk_receiver_id: 0_u8,
13348        rtk_health: 0_u8,
13349        rtk_rate: 0_u8,
13350        nsats: 0_u8,
13351        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
13352    };
13353    #[cfg(feature = "arbitrary")]
13354    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13355        use arbitrary::{Arbitrary, Unstructured};
13356        let mut buf = [0u8; 1024];
13357        rng.fill_bytes(&mut buf);
13358        let mut unstructured = Unstructured::new(&buf);
13359        Self::arbitrary(&mut unstructured).unwrap_or_default()
13360    }
13361}
13362impl Default for GPS2_RTK_DATA {
13363    fn default() -> Self {
13364        Self::DEFAULT.clone()
13365    }
13366}
13367impl MessageData for GPS2_RTK_DATA {
13368    type Message = MavMessage;
13369    const ID: u32 = 128u32;
13370    const NAME: &'static str = "GPS2_RTK";
13371    const EXTRA_CRC: u8 = 226u8;
13372    const ENCODED_LEN: usize = 35usize;
13373    fn deser(
13374        _version: MavlinkVersion,
13375        __input: &[u8],
13376    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13377        let avail_len = __input.len();
13378        let mut payload_buf = [0; Self::ENCODED_LEN];
13379        let mut buf = if avail_len < Self::ENCODED_LEN {
13380            payload_buf[0..avail_len].copy_from_slice(__input);
13381            Bytes::new(&payload_buf)
13382        } else {
13383            Bytes::new(__input)
13384        };
13385        let mut __struct = Self::default();
13386        __struct.time_last_baseline_ms = buf.get_u32_le();
13387        __struct.tow = buf.get_u32_le();
13388        __struct.baseline_a_mm = buf.get_i32_le();
13389        __struct.baseline_b_mm = buf.get_i32_le();
13390        __struct.baseline_c_mm = buf.get_i32_le();
13391        __struct.accuracy = buf.get_u32_le();
13392        __struct.iar_num_hypotheses = buf.get_i32_le();
13393        __struct.wn = buf.get_u16_le();
13394        __struct.rtk_receiver_id = buf.get_u8();
13395        __struct.rtk_health = buf.get_u8();
13396        __struct.rtk_rate = buf.get_u8();
13397        __struct.nsats = buf.get_u8();
13398        let tmp = buf.get_u8();
13399        __struct.baseline_coords_type =
13400            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13401                enum_type: "RtkBaselineCoordinateSystem",
13402                value: tmp as u32,
13403            })?;
13404        Ok(__struct)
13405    }
13406    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13407        let mut __tmp = BytesMut::new(bytes);
13408        #[allow(clippy::absurd_extreme_comparisons)]
13409        #[allow(unused_comparisons)]
13410        if __tmp.remaining() < Self::ENCODED_LEN {
13411            panic!(
13412                "buffer is too small (need {} bytes, but got {})",
13413                Self::ENCODED_LEN,
13414                __tmp.remaining(),
13415            )
13416        }
13417        __tmp.put_u32_le(self.time_last_baseline_ms);
13418        __tmp.put_u32_le(self.tow);
13419        __tmp.put_i32_le(self.baseline_a_mm);
13420        __tmp.put_i32_le(self.baseline_b_mm);
13421        __tmp.put_i32_le(self.baseline_c_mm);
13422        __tmp.put_u32_le(self.accuracy);
13423        __tmp.put_i32_le(self.iar_num_hypotheses);
13424        __tmp.put_u16_le(self.wn);
13425        __tmp.put_u8(self.rtk_receiver_id);
13426        __tmp.put_u8(self.rtk_health);
13427        __tmp.put_u8(self.rtk_rate);
13428        __tmp.put_u8(self.nsats);
13429        __tmp.put_u8(self.baseline_coords_type as u8);
13430        if matches!(version, MavlinkVersion::V2) {
13431            let len = __tmp.len();
13432            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13433        } else {
13434            __tmp.len()
13435        }
13436    }
13437}
13438#[doc = "id: 49"]
13439#[doc = "Publishes the GPS coordinates of the vehicle local origin (0,0,0) position. Emitted whenever a new GPS-Local position mapping is requested or set - e.g. following SET_GPS_GLOBAL_ORIGIN message."]
13440#[derive(Debug, Clone, PartialEq)]
13441#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13442#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13443pub struct GPS_GLOBAL_ORIGIN_DATA {
13444    #[doc = "Latitude (WGS84)"]
13445    pub latitude: i32,
13446    #[doc = "Longitude (WGS84)"]
13447    pub longitude: i32,
13448    #[doc = "Altitude (MSL). Positive for up."]
13449    pub altitude: i32,
13450    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13451    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13452    pub time_usec: u64,
13453}
13454impl GPS_GLOBAL_ORIGIN_DATA {
13455    pub const ENCODED_LEN: usize = 20usize;
13456    pub const DEFAULT: Self = Self {
13457        latitude: 0_i32,
13458        longitude: 0_i32,
13459        altitude: 0_i32,
13460        time_usec: 0_u64,
13461    };
13462    #[cfg(feature = "arbitrary")]
13463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13464        use arbitrary::{Arbitrary, Unstructured};
13465        let mut buf = [0u8; 1024];
13466        rng.fill_bytes(&mut buf);
13467        let mut unstructured = Unstructured::new(&buf);
13468        Self::arbitrary(&mut unstructured).unwrap_or_default()
13469    }
13470}
13471impl Default for GPS_GLOBAL_ORIGIN_DATA {
13472    fn default() -> Self {
13473        Self::DEFAULT.clone()
13474    }
13475}
13476impl MessageData for GPS_GLOBAL_ORIGIN_DATA {
13477    type Message = MavMessage;
13478    const ID: u32 = 49u32;
13479    const NAME: &'static str = "GPS_GLOBAL_ORIGIN";
13480    const EXTRA_CRC: u8 = 39u8;
13481    const ENCODED_LEN: usize = 20usize;
13482    fn deser(
13483        _version: MavlinkVersion,
13484        __input: &[u8],
13485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13486        let avail_len = __input.len();
13487        let mut payload_buf = [0; Self::ENCODED_LEN];
13488        let mut buf = if avail_len < Self::ENCODED_LEN {
13489            payload_buf[0..avail_len].copy_from_slice(__input);
13490            Bytes::new(&payload_buf)
13491        } else {
13492            Bytes::new(__input)
13493        };
13494        let mut __struct = Self::default();
13495        __struct.latitude = buf.get_i32_le();
13496        __struct.longitude = buf.get_i32_le();
13497        __struct.altitude = buf.get_i32_le();
13498        __struct.time_usec = buf.get_u64_le();
13499        Ok(__struct)
13500    }
13501    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13502        let mut __tmp = BytesMut::new(bytes);
13503        #[allow(clippy::absurd_extreme_comparisons)]
13504        #[allow(unused_comparisons)]
13505        if __tmp.remaining() < Self::ENCODED_LEN {
13506            panic!(
13507                "buffer is too small (need {} bytes, but got {})",
13508                Self::ENCODED_LEN,
13509                __tmp.remaining(),
13510            )
13511        }
13512        __tmp.put_i32_le(self.latitude);
13513        __tmp.put_i32_le(self.longitude);
13514        __tmp.put_i32_le(self.altitude);
13515        __tmp.put_u64_le(self.time_usec);
13516        if matches!(version, MavlinkVersion::V2) {
13517            let len = __tmp.len();
13518            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13519        } else {
13520            __tmp.len()
13521        }
13522    }
13523}
13524#[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
13525#[doc = "id: 123"]
13526#[doc = "Data for injecting into the onboard GPS (used for DGPS)."]
13527#[derive(Debug, Clone, PartialEq)]
13528#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13529#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13530pub struct GPS_INJECT_DATA_DATA {
13531    #[doc = "System ID"]
13532    pub target_system: u8,
13533    #[doc = "Component ID"]
13534    pub target_component: u8,
13535    #[doc = "Data length"]
13536    pub len: u8,
13537    #[doc = "Raw data (110 is enough for 12 satellites of RTCMv2)"]
13538    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13539    pub data: [u8; 110],
13540}
13541impl GPS_INJECT_DATA_DATA {
13542    pub const ENCODED_LEN: usize = 113usize;
13543    pub const DEFAULT: Self = Self {
13544        target_system: 0_u8,
13545        target_component: 0_u8,
13546        len: 0_u8,
13547        data: [0_u8; 110usize],
13548    };
13549    #[cfg(feature = "arbitrary")]
13550    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13551        use arbitrary::{Arbitrary, Unstructured};
13552        let mut buf = [0u8; 1024];
13553        rng.fill_bytes(&mut buf);
13554        let mut unstructured = Unstructured::new(&buf);
13555        Self::arbitrary(&mut unstructured).unwrap_or_default()
13556    }
13557}
13558impl Default for GPS_INJECT_DATA_DATA {
13559    fn default() -> Self {
13560        Self::DEFAULT.clone()
13561    }
13562}
13563impl MessageData for GPS_INJECT_DATA_DATA {
13564    type Message = MavMessage;
13565    const ID: u32 = 123u32;
13566    const NAME: &'static str = "GPS_INJECT_DATA";
13567    const EXTRA_CRC: u8 = 250u8;
13568    const ENCODED_LEN: usize = 113usize;
13569    fn deser(
13570        _version: MavlinkVersion,
13571        __input: &[u8],
13572    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13573        let avail_len = __input.len();
13574        let mut payload_buf = [0; Self::ENCODED_LEN];
13575        let mut buf = if avail_len < Self::ENCODED_LEN {
13576            payload_buf[0..avail_len].copy_from_slice(__input);
13577            Bytes::new(&payload_buf)
13578        } else {
13579            Bytes::new(__input)
13580        };
13581        let mut __struct = Self::default();
13582        __struct.target_system = buf.get_u8();
13583        __struct.target_component = buf.get_u8();
13584        __struct.len = buf.get_u8();
13585        for v in &mut __struct.data {
13586            let val = buf.get_u8();
13587            *v = val;
13588        }
13589        Ok(__struct)
13590    }
13591    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13592        let mut __tmp = BytesMut::new(bytes);
13593        #[allow(clippy::absurd_extreme_comparisons)]
13594        #[allow(unused_comparisons)]
13595        if __tmp.remaining() < Self::ENCODED_LEN {
13596            panic!(
13597                "buffer is too small (need {} bytes, but got {})",
13598                Self::ENCODED_LEN,
13599                __tmp.remaining(),
13600            )
13601        }
13602        __tmp.put_u8(self.target_system);
13603        __tmp.put_u8(self.target_component);
13604        __tmp.put_u8(self.len);
13605        for val in &self.data {
13606            __tmp.put_u8(*val);
13607        }
13608        if matches!(version, MavlinkVersion::V2) {
13609            let len = __tmp.len();
13610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13611        } else {
13612            __tmp.len()
13613        }
13614    }
13615}
13616#[doc = "id: 232"]
13617#[doc = "GPS sensor input message.  This is a raw sensor value sent by the GPS. This is NOT the global position estimate of the system."]
13618#[derive(Debug, Clone, PartialEq)]
13619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13621pub struct GPS_INPUT_DATA {
13622    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13623    pub time_usec: u64,
13624    #[doc = "GPS time (from start of GPS week)"]
13625    pub time_week_ms: u32,
13626    #[doc = "Latitude (WGS84)"]
13627    pub lat: i32,
13628    #[doc = "Longitude (WGS84)"]
13629    pub lon: i32,
13630    #[doc = "Altitude (MSL). Positive for up."]
13631    pub alt: f32,
13632    #[doc = "GPS HDOP horizontal dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13633    pub hdop: f32,
13634    #[doc = "GPS VDOP vertical dilution of position (unitless). If unknown, set to: UINT16_MAX"]
13635    pub vdop: f32,
13636    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
13637    pub vn: f32,
13638    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
13639    pub ve: f32,
13640    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
13641    pub vd: f32,
13642    #[doc = "GPS speed accuracy"]
13643    pub speed_accuracy: f32,
13644    #[doc = "GPS horizontal accuracy"]
13645    pub horiz_accuracy: f32,
13646    #[doc = "GPS vertical accuracy"]
13647    pub vert_accuracy: f32,
13648    #[doc = "Bitmap indicating which GPS input flags fields to ignore.  All other fields must be provided."]
13649    pub ignore_flags: GpsInputIgnoreFlags,
13650    #[doc = "GPS week number"]
13651    pub time_week: u16,
13652    #[doc = "ID of the GPS for multiple GPS inputs"]
13653    pub gps_id: u8,
13654    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. 4: 3D with DGPS. 5: 3D with RTK"]
13655    pub fix_type: u8,
13656    #[doc = "Number of satellites visible."]
13657    pub satellites_visible: u8,
13658    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
13659    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13660    pub yaw: u16,
13661}
13662impl GPS_INPUT_DATA {
13663    pub const ENCODED_LEN: usize = 65usize;
13664    pub const DEFAULT: Self = Self {
13665        time_usec: 0_u64,
13666        time_week_ms: 0_u32,
13667        lat: 0_i32,
13668        lon: 0_i32,
13669        alt: 0.0_f32,
13670        hdop: 0.0_f32,
13671        vdop: 0.0_f32,
13672        vn: 0.0_f32,
13673        ve: 0.0_f32,
13674        vd: 0.0_f32,
13675        speed_accuracy: 0.0_f32,
13676        horiz_accuracy: 0.0_f32,
13677        vert_accuracy: 0.0_f32,
13678        ignore_flags: GpsInputIgnoreFlags::DEFAULT,
13679        time_week: 0_u16,
13680        gps_id: 0_u8,
13681        fix_type: 0_u8,
13682        satellites_visible: 0_u8,
13683        yaw: 0_u16,
13684    };
13685    #[cfg(feature = "arbitrary")]
13686    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13687        use arbitrary::{Arbitrary, Unstructured};
13688        let mut buf = [0u8; 1024];
13689        rng.fill_bytes(&mut buf);
13690        let mut unstructured = Unstructured::new(&buf);
13691        Self::arbitrary(&mut unstructured).unwrap_or_default()
13692    }
13693}
13694impl Default for GPS_INPUT_DATA {
13695    fn default() -> Self {
13696        Self::DEFAULT.clone()
13697    }
13698}
13699impl MessageData for GPS_INPUT_DATA {
13700    type Message = MavMessage;
13701    const ID: u32 = 232u32;
13702    const NAME: &'static str = "GPS_INPUT";
13703    const EXTRA_CRC: u8 = 151u8;
13704    const ENCODED_LEN: usize = 65usize;
13705    fn deser(
13706        _version: MavlinkVersion,
13707        __input: &[u8],
13708    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13709        let avail_len = __input.len();
13710        let mut payload_buf = [0; Self::ENCODED_LEN];
13711        let mut buf = if avail_len < Self::ENCODED_LEN {
13712            payload_buf[0..avail_len].copy_from_slice(__input);
13713            Bytes::new(&payload_buf)
13714        } else {
13715            Bytes::new(__input)
13716        };
13717        let mut __struct = Self::default();
13718        __struct.time_usec = buf.get_u64_le();
13719        __struct.time_week_ms = buf.get_u32_le();
13720        __struct.lat = buf.get_i32_le();
13721        __struct.lon = buf.get_i32_le();
13722        __struct.alt = buf.get_f32_le();
13723        __struct.hdop = buf.get_f32_le();
13724        __struct.vdop = buf.get_f32_le();
13725        __struct.vn = buf.get_f32_le();
13726        __struct.ve = buf.get_f32_le();
13727        __struct.vd = buf.get_f32_le();
13728        __struct.speed_accuracy = buf.get_f32_le();
13729        __struct.horiz_accuracy = buf.get_f32_le();
13730        __struct.vert_accuracy = buf.get_f32_le();
13731        let tmp = buf.get_u16_le();
13732        __struct.ignore_flags = GpsInputIgnoreFlags::from_bits(
13733            tmp & GpsInputIgnoreFlags::all().bits(),
13734        )
13735        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
13736            flag_type: "GpsInputIgnoreFlags",
13737            value: tmp as u32,
13738        })?;
13739        __struct.time_week = buf.get_u16_le();
13740        __struct.gps_id = buf.get_u8();
13741        __struct.fix_type = buf.get_u8();
13742        __struct.satellites_visible = buf.get_u8();
13743        __struct.yaw = buf.get_u16_le();
13744        Ok(__struct)
13745    }
13746    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13747        let mut __tmp = BytesMut::new(bytes);
13748        #[allow(clippy::absurd_extreme_comparisons)]
13749        #[allow(unused_comparisons)]
13750        if __tmp.remaining() < Self::ENCODED_LEN {
13751            panic!(
13752                "buffer is too small (need {} bytes, but got {})",
13753                Self::ENCODED_LEN,
13754                __tmp.remaining(),
13755            )
13756        }
13757        __tmp.put_u64_le(self.time_usec);
13758        __tmp.put_u32_le(self.time_week_ms);
13759        __tmp.put_i32_le(self.lat);
13760        __tmp.put_i32_le(self.lon);
13761        __tmp.put_f32_le(self.alt);
13762        __tmp.put_f32_le(self.hdop);
13763        __tmp.put_f32_le(self.vdop);
13764        __tmp.put_f32_le(self.vn);
13765        __tmp.put_f32_le(self.ve);
13766        __tmp.put_f32_le(self.vd);
13767        __tmp.put_f32_le(self.speed_accuracy);
13768        __tmp.put_f32_le(self.horiz_accuracy);
13769        __tmp.put_f32_le(self.vert_accuracy);
13770        __tmp.put_u16_le(self.ignore_flags.bits());
13771        __tmp.put_u16_le(self.time_week);
13772        __tmp.put_u8(self.gps_id);
13773        __tmp.put_u8(self.fix_type);
13774        __tmp.put_u8(self.satellites_visible);
13775        __tmp.put_u16_le(self.yaw);
13776        if matches!(version, MavlinkVersion::V2) {
13777            let len = __tmp.len();
13778            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13779        } else {
13780            __tmp.len()
13781        }
13782    }
13783}
13784#[doc = "id: 24"]
13785#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                 NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
13786#[derive(Debug, Clone, PartialEq)]
13787#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13788#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13789pub struct GPS_RAW_INT_DATA {
13790    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
13791    pub time_usec: u64,
13792    #[doc = "Latitude (WGS84, EGM96 ellipsoid)"]
13793    pub lat: i32,
13794    #[doc = "Longitude (WGS84, EGM96 ellipsoid)"]
13795    pub lon: i32,
13796    #[doc = "Altitude (MSL). Positive for up. Note that virtually all GPS modules provide the MSL altitude in addition to the WGS84 altitude."]
13797    pub alt: i32,
13798    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13799    pub eph: u16,
13800    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
13801    pub epv: u16,
13802    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
13803    pub vel: u16,
13804    #[doc = "Course over ground (NOT heading, but direction of movement) in degrees * 100, 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
13805    pub cog: u16,
13806    #[doc = "GPS fix type."]
13807    pub fix_type: GpsFixType,
13808    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
13809    pub satellites_visible: u8,
13810    #[doc = "Altitude (above WGS84, EGM96 ellipsoid). Positive for up."]
13811    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13812    pub alt_ellipsoid: i32,
13813    #[doc = "Position uncertainty."]
13814    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13815    pub h_acc: u32,
13816    #[doc = "Altitude uncertainty."]
13817    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13818    pub v_acc: u32,
13819    #[doc = "Speed uncertainty."]
13820    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13821    pub vel_acc: u32,
13822    #[doc = "Heading / track uncertainty"]
13823    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13824    pub hdg_acc: u32,
13825    #[doc = "Yaw in earth frame from north. Use 0 if this GPS does not provide yaw. Use UINT16_MAX if this GPS is configured to provide yaw and is currently unable to provide it. Use 36000 for north."]
13826    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
13827    pub yaw: u16,
13828}
13829impl GPS_RAW_INT_DATA {
13830    pub const ENCODED_LEN: usize = 52usize;
13831    pub const DEFAULT: Self = Self {
13832        time_usec: 0_u64,
13833        lat: 0_i32,
13834        lon: 0_i32,
13835        alt: 0_i32,
13836        eph: 0_u16,
13837        epv: 0_u16,
13838        vel: 0_u16,
13839        cog: 0_u16,
13840        fix_type: GpsFixType::DEFAULT,
13841        satellites_visible: 0_u8,
13842        alt_ellipsoid: 0_i32,
13843        h_acc: 0_u32,
13844        v_acc: 0_u32,
13845        vel_acc: 0_u32,
13846        hdg_acc: 0_u32,
13847        yaw: 0_u16,
13848    };
13849    #[cfg(feature = "arbitrary")]
13850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13851        use arbitrary::{Arbitrary, Unstructured};
13852        let mut buf = [0u8; 1024];
13853        rng.fill_bytes(&mut buf);
13854        let mut unstructured = Unstructured::new(&buf);
13855        Self::arbitrary(&mut unstructured).unwrap_or_default()
13856    }
13857}
13858impl Default for GPS_RAW_INT_DATA {
13859    fn default() -> Self {
13860        Self::DEFAULT.clone()
13861    }
13862}
13863impl MessageData for GPS_RAW_INT_DATA {
13864    type Message = MavMessage;
13865    const ID: u32 = 24u32;
13866    const NAME: &'static str = "GPS_RAW_INT";
13867    const EXTRA_CRC: u8 = 24u8;
13868    const ENCODED_LEN: usize = 52usize;
13869    fn deser(
13870        _version: MavlinkVersion,
13871        __input: &[u8],
13872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13873        let avail_len = __input.len();
13874        let mut payload_buf = [0; Self::ENCODED_LEN];
13875        let mut buf = if avail_len < Self::ENCODED_LEN {
13876            payload_buf[0..avail_len].copy_from_slice(__input);
13877            Bytes::new(&payload_buf)
13878        } else {
13879            Bytes::new(__input)
13880        };
13881        let mut __struct = Self::default();
13882        __struct.time_usec = buf.get_u64_le();
13883        __struct.lat = buf.get_i32_le();
13884        __struct.lon = buf.get_i32_le();
13885        __struct.alt = buf.get_i32_le();
13886        __struct.eph = buf.get_u16_le();
13887        __struct.epv = buf.get_u16_le();
13888        __struct.vel = buf.get_u16_le();
13889        __struct.cog = buf.get_u16_le();
13890        let tmp = buf.get_u8();
13891        __struct.fix_type =
13892            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
13893                enum_type: "GpsFixType",
13894                value: tmp as u32,
13895            })?;
13896        __struct.satellites_visible = buf.get_u8();
13897        __struct.alt_ellipsoid = buf.get_i32_le();
13898        __struct.h_acc = buf.get_u32_le();
13899        __struct.v_acc = buf.get_u32_le();
13900        __struct.vel_acc = buf.get_u32_le();
13901        __struct.hdg_acc = buf.get_u32_le();
13902        __struct.yaw = buf.get_u16_le();
13903        Ok(__struct)
13904    }
13905    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
13906        let mut __tmp = BytesMut::new(bytes);
13907        #[allow(clippy::absurd_extreme_comparisons)]
13908        #[allow(unused_comparisons)]
13909        if __tmp.remaining() < Self::ENCODED_LEN {
13910            panic!(
13911                "buffer is too small (need {} bytes, but got {})",
13912                Self::ENCODED_LEN,
13913                __tmp.remaining(),
13914            )
13915        }
13916        __tmp.put_u64_le(self.time_usec);
13917        __tmp.put_i32_le(self.lat);
13918        __tmp.put_i32_le(self.lon);
13919        __tmp.put_i32_le(self.alt);
13920        __tmp.put_u16_le(self.eph);
13921        __tmp.put_u16_le(self.epv);
13922        __tmp.put_u16_le(self.vel);
13923        __tmp.put_u16_le(self.cog);
13924        __tmp.put_u8(self.fix_type as u8);
13925        __tmp.put_u8(self.satellites_visible);
13926        __tmp.put_i32_le(self.alt_ellipsoid);
13927        __tmp.put_u32_le(self.h_acc);
13928        __tmp.put_u32_le(self.v_acc);
13929        __tmp.put_u32_le(self.vel_acc);
13930        __tmp.put_u32_le(self.hdg_acc);
13931        __tmp.put_u16_le(self.yaw);
13932        if matches!(version, MavlinkVersion::V2) {
13933            let len = __tmp.len();
13934            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
13935        } else {
13936            __tmp.len()
13937        }
13938    }
13939}
13940#[doc = "id: 233"]
13941#[doc = "RTCM message for injecting into the onboard GPS (used for DGPS)."]
13942#[derive(Debug, Clone, PartialEq)]
13943#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
13944#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
13945pub struct GPS_RTCM_DATA_DATA {
13946    #[doc = "LSB: 1 means message is fragmented, next 2 bits are the fragment ID, the remaining 5 bits are used for the sequence ID. Messages are only to be flushed to the GPS when the entire message has been reconstructed on the autopilot. The fragment ID specifies which order the fragments should be assembled into a buffer, while the sequence ID is used to detect a mismatch between different buffers. The buffer is considered fully reconstructed when either all 4 fragments are present, or all the fragments before the first fragment with a non full payload is received. This management is used to ensure that normal GPS operation doesn't corrupt RTCM data, and to recover from a unreliable transport delivery order."]
13947    pub flags: u8,
13948    #[doc = "data length"]
13949    pub len: u8,
13950    #[doc = "RTCM message (may be fragmented)"]
13951    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
13952    pub data: [u8; 180],
13953}
13954impl GPS_RTCM_DATA_DATA {
13955    pub const ENCODED_LEN: usize = 182usize;
13956    pub const DEFAULT: Self = Self {
13957        flags: 0_u8,
13958        len: 0_u8,
13959        data: [0_u8; 180usize],
13960    };
13961    #[cfg(feature = "arbitrary")]
13962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
13963        use arbitrary::{Arbitrary, Unstructured};
13964        let mut buf = [0u8; 1024];
13965        rng.fill_bytes(&mut buf);
13966        let mut unstructured = Unstructured::new(&buf);
13967        Self::arbitrary(&mut unstructured).unwrap_or_default()
13968    }
13969}
13970impl Default for GPS_RTCM_DATA_DATA {
13971    fn default() -> Self {
13972        Self::DEFAULT.clone()
13973    }
13974}
13975impl MessageData for GPS_RTCM_DATA_DATA {
13976    type Message = MavMessage;
13977    const ID: u32 = 233u32;
13978    const NAME: &'static str = "GPS_RTCM_DATA";
13979    const EXTRA_CRC: u8 = 35u8;
13980    const ENCODED_LEN: usize = 182usize;
13981    fn deser(
13982        _version: MavlinkVersion,
13983        __input: &[u8],
13984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
13985        let avail_len = __input.len();
13986        let mut payload_buf = [0; Self::ENCODED_LEN];
13987        let mut buf = if avail_len < Self::ENCODED_LEN {
13988            payload_buf[0..avail_len].copy_from_slice(__input);
13989            Bytes::new(&payload_buf)
13990        } else {
13991            Bytes::new(__input)
13992        };
13993        let mut __struct = Self::default();
13994        __struct.flags = buf.get_u8();
13995        __struct.len = buf.get_u8();
13996        for v in &mut __struct.data {
13997            let val = buf.get_u8();
13998            *v = val;
13999        }
14000        Ok(__struct)
14001    }
14002    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14003        let mut __tmp = BytesMut::new(bytes);
14004        #[allow(clippy::absurd_extreme_comparisons)]
14005        #[allow(unused_comparisons)]
14006        if __tmp.remaining() < Self::ENCODED_LEN {
14007            panic!(
14008                "buffer is too small (need {} bytes, but got {})",
14009                Self::ENCODED_LEN,
14010                __tmp.remaining(),
14011            )
14012        }
14013        __tmp.put_u8(self.flags);
14014        __tmp.put_u8(self.len);
14015        for val in &self.data {
14016            __tmp.put_u8(*val);
14017        }
14018        if matches!(version, MavlinkVersion::V2) {
14019            let len = __tmp.len();
14020            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14021        } else {
14022            __tmp.len()
14023        }
14024    }
14025}
14026#[doc = "id: 127"]
14027#[doc = "RTK GPS data. Gives information on the relative baseline calculation the GPS is reporting."]
14028#[derive(Debug, Clone, PartialEq)]
14029#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14030#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14031pub struct GPS_RTK_DATA {
14032    #[doc = "Time since boot of last baseline message received."]
14033    pub time_last_baseline_ms: u32,
14034    #[doc = "GPS Time of Week of last baseline"]
14035    pub tow: u32,
14036    #[doc = "Current baseline in ECEF x or NED north component."]
14037    pub baseline_a_mm: i32,
14038    #[doc = "Current baseline in ECEF y or NED east component."]
14039    pub baseline_b_mm: i32,
14040    #[doc = "Current baseline in ECEF z or NED down component."]
14041    pub baseline_c_mm: i32,
14042    #[doc = "Current estimate of baseline accuracy."]
14043    pub accuracy: u32,
14044    #[doc = "Current number of integer ambiguity hypotheses."]
14045    pub iar_num_hypotheses: i32,
14046    #[doc = "GPS Week Number of last baseline"]
14047    pub wn: u16,
14048    #[doc = "Identification of connected RTK receiver."]
14049    pub rtk_receiver_id: u8,
14050    #[doc = "GPS-specific health report for RTK data."]
14051    pub rtk_health: u8,
14052    #[doc = "Rate of baseline messages being received by GPS"]
14053    pub rtk_rate: u8,
14054    #[doc = "Current number of sats used for RTK calculation."]
14055    pub nsats: u8,
14056    #[doc = "Coordinate system of baseline"]
14057    pub baseline_coords_type: RtkBaselineCoordinateSystem,
14058}
14059impl GPS_RTK_DATA {
14060    pub const ENCODED_LEN: usize = 35usize;
14061    pub const DEFAULT: Self = Self {
14062        time_last_baseline_ms: 0_u32,
14063        tow: 0_u32,
14064        baseline_a_mm: 0_i32,
14065        baseline_b_mm: 0_i32,
14066        baseline_c_mm: 0_i32,
14067        accuracy: 0_u32,
14068        iar_num_hypotheses: 0_i32,
14069        wn: 0_u16,
14070        rtk_receiver_id: 0_u8,
14071        rtk_health: 0_u8,
14072        rtk_rate: 0_u8,
14073        nsats: 0_u8,
14074        baseline_coords_type: RtkBaselineCoordinateSystem::DEFAULT,
14075    };
14076    #[cfg(feature = "arbitrary")]
14077    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14078        use arbitrary::{Arbitrary, Unstructured};
14079        let mut buf = [0u8; 1024];
14080        rng.fill_bytes(&mut buf);
14081        let mut unstructured = Unstructured::new(&buf);
14082        Self::arbitrary(&mut unstructured).unwrap_or_default()
14083    }
14084}
14085impl Default for GPS_RTK_DATA {
14086    fn default() -> Self {
14087        Self::DEFAULT.clone()
14088    }
14089}
14090impl MessageData for GPS_RTK_DATA {
14091    type Message = MavMessage;
14092    const ID: u32 = 127u32;
14093    const NAME: &'static str = "GPS_RTK";
14094    const EXTRA_CRC: u8 = 25u8;
14095    const ENCODED_LEN: usize = 35usize;
14096    fn deser(
14097        _version: MavlinkVersion,
14098        __input: &[u8],
14099    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14100        let avail_len = __input.len();
14101        let mut payload_buf = [0; Self::ENCODED_LEN];
14102        let mut buf = if avail_len < Self::ENCODED_LEN {
14103            payload_buf[0..avail_len].copy_from_slice(__input);
14104            Bytes::new(&payload_buf)
14105        } else {
14106            Bytes::new(__input)
14107        };
14108        let mut __struct = Self::default();
14109        __struct.time_last_baseline_ms = buf.get_u32_le();
14110        __struct.tow = buf.get_u32_le();
14111        __struct.baseline_a_mm = buf.get_i32_le();
14112        __struct.baseline_b_mm = buf.get_i32_le();
14113        __struct.baseline_c_mm = buf.get_i32_le();
14114        __struct.accuracy = buf.get_u32_le();
14115        __struct.iar_num_hypotheses = buf.get_i32_le();
14116        __struct.wn = buf.get_u16_le();
14117        __struct.rtk_receiver_id = buf.get_u8();
14118        __struct.rtk_health = buf.get_u8();
14119        __struct.rtk_rate = buf.get_u8();
14120        __struct.nsats = buf.get_u8();
14121        let tmp = buf.get_u8();
14122        __struct.baseline_coords_type =
14123            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14124                enum_type: "RtkBaselineCoordinateSystem",
14125                value: tmp as u32,
14126            })?;
14127        Ok(__struct)
14128    }
14129    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14130        let mut __tmp = BytesMut::new(bytes);
14131        #[allow(clippy::absurd_extreme_comparisons)]
14132        #[allow(unused_comparisons)]
14133        if __tmp.remaining() < Self::ENCODED_LEN {
14134            panic!(
14135                "buffer is too small (need {} bytes, but got {})",
14136                Self::ENCODED_LEN,
14137                __tmp.remaining(),
14138            )
14139        }
14140        __tmp.put_u32_le(self.time_last_baseline_ms);
14141        __tmp.put_u32_le(self.tow);
14142        __tmp.put_i32_le(self.baseline_a_mm);
14143        __tmp.put_i32_le(self.baseline_b_mm);
14144        __tmp.put_i32_le(self.baseline_c_mm);
14145        __tmp.put_u32_le(self.accuracy);
14146        __tmp.put_i32_le(self.iar_num_hypotheses);
14147        __tmp.put_u16_le(self.wn);
14148        __tmp.put_u8(self.rtk_receiver_id);
14149        __tmp.put_u8(self.rtk_health);
14150        __tmp.put_u8(self.rtk_rate);
14151        __tmp.put_u8(self.nsats);
14152        __tmp.put_u8(self.baseline_coords_type as u8);
14153        if matches!(version, MavlinkVersion::V2) {
14154            let len = __tmp.len();
14155            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14156        } else {
14157            __tmp.len()
14158        }
14159    }
14160}
14161#[doc = "id: 25"]
14162#[doc = "The positioning status, as reported by GPS. This message is intended to display status information about each satellite visible to the receiver. See message GLOBAL_POSITION_INT for the global position estimate. This message can contain information for up to 20 satellites."]
14163#[derive(Debug, Clone, PartialEq)]
14164#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14165#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14166pub struct GPS_STATUS_DATA {
14167    #[doc = "Number of satellites visible"]
14168    pub satellites_visible: u8,
14169    #[doc = "Global satellite ID"]
14170    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14171    pub satellite_prn: [u8; 20],
14172    #[doc = "0: Satellite not used, 1: used for localization"]
14173    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14174    pub satellite_used: [u8; 20],
14175    #[doc = "Elevation (0: right on top of receiver, 90: on the horizon) of satellite"]
14176    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14177    pub satellite_elevation: [u8; 20],
14178    #[doc = "Direction of satellite, 0: 0 deg, 255: 360 deg."]
14179    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14180    pub satellite_azimuth: [u8; 20],
14181    #[doc = "Signal to noise ratio of satellite"]
14182    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14183    pub satellite_snr: [u8; 20],
14184}
14185impl GPS_STATUS_DATA {
14186    pub const ENCODED_LEN: usize = 101usize;
14187    pub const DEFAULT: Self = Self {
14188        satellites_visible: 0_u8,
14189        satellite_prn: [0_u8; 20usize],
14190        satellite_used: [0_u8; 20usize],
14191        satellite_elevation: [0_u8; 20usize],
14192        satellite_azimuth: [0_u8; 20usize],
14193        satellite_snr: [0_u8; 20usize],
14194    };
14195    #[cfg(feature = "arbitrary")]
14196    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14197        use arbitrary::{Arbitrary, Unstructured};
14198        let mut buf = [0u8; 1024];
14199        rng.fill_bytes(&mut buf);
14200        let mut unstructured = Unstructured::new(&buf);
14201        Self::arbitrary(&mut unstructured).unwrap_or_default()
14202    }
14203}
14204impl Default for GPS_STATUS_DATA {
14205    fn default() -> Self {
14206        Self::DEFAULT.clone()
14207    }
14208}
14209impl MessageData for GPS_STATUS_DATA {
14210    type Message = MavMessage;
14211    const ID: u32 = 25u32;
14212    const NAME: &'static str = "GPS_STATUS";
14213    const EXTRA_CRC: u8 = 23u8;
14214    const ENCODED_LEN: usize = 101usize;
14215    fn deser(
14216        _version: MavlinkVersion,
14217        __input: &[u8],
14218    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14219        let avail_len = __input.len();
14220        let mut payload_buf = [0; Self::ENCODED_LEN];
14221        let mut buf = if avail_len < Self::ENCODED_LEN {
14222            payload_buf[0..avail_len].copy_from_slice(__input);
14223            Bytes::new(&payload_buf)
14224        } else {
14225            Bytes::new(__input)
14226        };
14227        let mut __struct = Self::default();
14228        __struct.satellites_visible = buf.get_u8();
14229        for v in &mut __struct.satellite_prn {
14230            let val = buf.get_u8();
14231            *v = val;
14232        }
14233        for v in &mut __struct.satellite_used {
14234            let val = buf.get_u8();
14235            *v = val;
14236        }
14237        for v in &mut __struct.satellite_elevation {
14238            let val = buf.get_u8();
14239            *v = val;
14240        }
14241        for v in &mut __struct.satellite_azimuth {
14242            let val = buf.get_u8();
14243            *v = val;
14244        }
14245        for v in &mut __struct.satellite_snr {
14246            let val = buf.get_u8();
14247            *v = val;
14248        }
14249        Ok(__struct)
14250    }
14251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14252        let mut __tmp = BytesMut::new(bytes);
14253        #[allow(clippy::absurd_extreme_comparisons)]
14254        #[allow(unused_comparisons)]
14255        if __tmp.remaining() < Self::ENCODED_LEN {
14256            panic!(
14257                "buffer is too small (need {} bytes, but got {})",
14258                Self::ENCODED_LEN,
14259                __tmp.remaining(),
14260            )
14261        }
14262        __tmp.put_u8(self.satellites_visible);
14263        for val in &self.satellite_prn {
14264            __tmp.put_u8(*val);
14265        }
14266        for val in &self.satellite_used {
14267            __tmp.put_u8(*val);
14268        }
14269        for val in &self.satellite_elevation {
14270            __tmp.put_u8(*val);
14271        }
14272        for val in &self.satellite_azimuth {
14273            __tmp.put_u8(*val);
14274        }
14275        for val in &self.satellite_snr {
14276            __tmp.put_u8(*val);
14277        }
14278        if matches!(version, MavlinkVersion::V2) {
14279            let len = __tmp.len();
14280            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14281        } else {
14282            __tmp.len()
14283        }
14284    }
14285}
14286#[doc = "id: 0"]
14287#[doc = "The heartbeat message shows that a system or component is present and responding. The type and autopilot fields (along with the message component id), allow the receiving system to treat further messages from this system appropriately (e.g. by laying out the user interface based on the autopilot). This microservice is documented at <https://mavlink.io/en/services/heartbeat.html>."]
14288#[derive(Debug, Clone, PartialEq)]
14289#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14290#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14291pub struct HEARTBEAT_DATA {
14292    #[doc = "A bitfield for use for autopilot-specific flags"]
14293    pub custom_mode: u32,
14294    #[doc = "Vehicle or component type. For a flight controller component the vehicle type (quadrotor, helicopter, etc.). For other components the component type (e.g. camera, gimbal, etc.). This should be used in preference to component id for identifying the component type."]
14295    pub mavtype: MavType,
14296    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14297    pub autopilot: MavAutopilot,
14298    #[doc = "System mode bitmap."]
14299    pub base_mode: MavModeFlag,
14300    #[doc = "System status flag."]
14301    pub system_status: MavState,
14302    #[doc = "MAVLink version, not writable by user, gets added by protocol because of magic data type: uint8_t_mavlink_version"]
14303    pub mavlink_version: u8,
14304}
14305impl HEARTBEAT_DATA {
14306    pub const ENCODED_LEN: usize = 9usize;
14307    pub const DEFAULT: Self = Self {
14308        custom_mode: 0_u32,
14309        mavtype: MavType::DEFAULT,
14310        autopilot: MavAutopilot::DEFAULT,
14311        base_mode: MavModeFlag::DEFAULT,
14312        system_status: MavState::DEFAULT,
14313        mavlink_version: MINOR_MAVLINK_VERSION,
14314    };
14315    #[cfg(feature = "arbitrary")]
14316    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14317        use arbitrary::{Arbitrary, Unstructured};
14318        let mut buf = [0u8; 1024];
14319        rng.fill_bytes(&mut buf);
14320        let mut unstructured = Unstructured::new(&buf);
14321        Self::arbitrary(&mut unstructured).unwrap_or_default()
14322    }
14323}
14324impl Default for HEARTBEAT_DATA {
14325    fn default() -> Self {
14326        Self::DEFAULT.clone()
14327    }
14328}
14329impl MessageData for HEARTBEAT_DATA {
14330    type Message = MavMessage;
14331    const ID: u32 = 0u32;
14332    const NAME: &'static str = "HEARTBEAT";
14333    const EXTRA_CRC: u8 = 50u8;
14334    const ENCODED_LEN: usize = 9usize;
14335    fn deser(
14336        _version: MavlinkVersion,
14337        __input: &[u8],
14338    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14339        let avail_len = __input.len();
14340        let mut payload_buf = [0; Self::ENCODED_LEN];
14341        let mut buf = if avail_len < Self::ENCODED_LEN {
14342            payload_buf[0..avail_len].copy_from_slice(__input);
14343            Bytes::new(&payload_buf)
14344        } else {
14345            Bytes::new(__input)
14346        };
14347        let mut __struct = Self::default();
14348        __struct.custom_mode = buf.get_u32_le();
14349        let tmp = buf.get_u8();
14350        __struct.mavtype =
14351            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14352                enum_type: "MavType",
14353                value: tmp as u32,
14354            })?;
14355        let tmp = buf.get_u8();
14356        __struct.autopilot =
14357            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14358                enum_type: "MavAutopilot",
14359                value: tmp as u32,
14360            })?;
14361        let tmp = buf.get_u8();
14362        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14363            ::mavlink_core::error::ParserError::InvalidFlag {
14364                flag_type: "MavModeFlag",
14365                value: tmp as u32,
14366            },
14367        )?;
14368        let tmp = buf.get_u8();
14369        __struct.system_status =
14370            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14371                enum_type: "MavState",
14372                value: tmp as u32,
14373            })?;
14374        __struct.mavlink_version = buf.get_u8();
14375        Ok(__struct)
14376    }
14377    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14378        let mut __tmp = BytesMut::new(bytes);
14379        #[allow(clippy::absurd_extreme_comparisons)]
14380        #[allow(unused_comparisons)]
14381        if __tmp.remaining() < Self::ENCODED_LEN {
14382            panic!(
14383                "buffer is too small (need {} bytes, but got {})",
14384                Self::ENCODED_LEN,
14385                __tmp.remaining(),
14386            )
14387        }
14388        __tmp.put_u32_le(self.custom_mode);
14389        __tmp.put_u8(self.mavtype as u8);
14390        __tmp.put_u8(self.autopilot as u8);
14391        __tmp.put_u8(self.base_mode.bits());
14392        __tmp.put_u8(self.system_status as u8);
14393        __tmp.put_u8(self.mavlink_version);
14394        if matches!(version, MavlinkVersion::V2) {
14395            let len = __tmp.len();
14396            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14397        } else {
14398            __tmp.len()
14399        }
14400    }
14401}
14402#[doc = "id: 105"]
14403#[doc = "The IMU readings in SI units in NED body frame."]
14404#[derive(Debug, Clone, PartialEq)]
14405#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14406#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14407pub struct HIGHRES_IMU_DATA {
14408    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14409    pub time_usec: u64,
14410    #[doc = "X acceleration"]
14411    pub xacc: f32,
14412    #[doc = "Y acceleration"]
14413    pub yacc: f32,
14414    #[doc = "Z acceleration"]
14415    pub zacc: f32,
14416    #[doc = "Angular speed around X axis"]
14417    pub xgyro: f32,
14418    #[doc = "Angular speed around Y axis"]
14419    pub ygyro: f32,
14420    #[doc = "Angular speed around Z axis"]
14421    pub zgyro: f32,
14422    #[doc = "X Magnetic field"]
14423    pub xmag: f32,
14424    #[doc = "Y Magnetic field"]
14425    pub ymag: f32,
14426    #[doc = "Z Magnetic field"]
14427    pub zmag: f32,
14428    #[doc = "Absolute pressure"]
14429    pub abs_pressure: f32,
14430    #[doc = "Differential pressure"]
14431    pub diff_pressure: f32,
14432    #[doc = "Altitude calculated from pressure"]
14433    pub pressure_alt: f32,
14434    #[doc = "Temperature"]
14435    pub temperature: f32,
14436    #[doc = "Bitmap for fields that have updated since last message"]
14437    pub fields_updated: HighresImuUpdatedFlags,
14438    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
14439    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
14440    pub id: u8,
14441}
14442impl HIGHRES_IMU_DATA {
14443    pub const ENCODED_LEN: usize = 63usize;
14444    pub const DEFAULT: Self = Self {
14445        time_usec: 0_u64,
14446        xacc: 0.0_f32,
14447        yacc: 0.0_f32,
14448        zacc: 0.0_f32,
14449        xgyro: 0.0_f32,
14450        ygyro: 0.0_f32,
14451        zgyro: 0.0_f32,
14452        xmag: 0.0_f32,
14453        ymag: 0.0_f32,
14454        zmag: 0.0_f32,
14455        abs_pressure: 0.0_f32,
14456        diff_pressure: 0.0_f32,
14457        pressure_alt: 0.0_f32,
14458        temperature: 0.0_f32,
14459        fields_updated: HighresImuUpdatedFlags::DEFAULT,
14460        id: 0_u8,
14461    };
14462    #[cfg(feature = "arbitrary")]
14463    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14464        use arbitrary::{Arbitrary, Unstructured};
14465        let mut buf = [0u8; 1024];
14466        rng.fill_bytes(&mut buf);
14467        let mut unstructured = Unstructured::new(&buf);
14468        Self::arbitrary(&mut unstructured).unwrap_or_default()
14469    }
14470}
14471impl Default for HIGHRES_IMU_DATA {
14472    fn default() -> Self {
14473        Self::DEFAULT.clone()
14474    }
14475}
14476impl MessageData for HIGHRES_IMU_DATA {
14477    type Message = MavMessage;
14478    const ID: u32 = 105u32;
14479    const NAME: &'static str = "HIGHRES_IMU";
14480    const EXTRA_CRC: u8 = 93u8;
14481    const ENCODED_LEN: usize = 63usize;
14482    fn deser(
14483        _version: MavlinkVersion,
14484        __input: &[u8],
14485    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14486        let avail_len = __input.len();
14487        let mut payload_buf = [0; Self::ENCODED_LEN];
14488        let mut buf = if avail_len < Self::ENCODED_LEN {
14489            payload_buf[0..avail_len].copy_from_slice(__input);
14490            Bytes::new(&payload_buf)
14491        } else {
14492            Bytes::new(__input)
14493        };
14494        let mut __struct = Self::default();
14495        __struct.time_usec = buf.get_u64_le();
14496        __struct.xacc = buf.get_f32_le();
14497        __struct.yacc = buf.get_f32_le();
14498        __struct.zacc = buf.get_f32_le();
14499        __struct.xgyro = buf.get_f32_le();
14500        __struct.ygyro = buf.get_f32_le();
14501        __struct.zgyro = buf.get_f32_le();
14502        __struct.xmag = buf.get_f32_le();
14503        __struct.ymag = buf.get_f32_le();
14504        __struct.zmag = buf.get_f32_le();
14505        __struct.abs_pressure = buf.get_f32_le();
14506        __struct.diff_pressure = buf.get_f32_le();
14507        __struct.pressure_alt = buf.get_f32_le();
14508        __struct.temperature = buf.get_f32_le();
14509        let tmp = buf.get_u16_le();
14510        __struct.fields_updated = HighresImuUpdatedFlags::from_bits(
14511            tmp & HighresImuUpdatedFlags::all().bits(),
14512        )
14513        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14514            flag_type: "HighresImuUpdatedFlags",
14515            value: tmp as u32,
14516        })?;
14517        __struct.id = buf.get_u8();
14518        Ok(__struct)
14519    }
14520    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14521        let mut __tmp = BytesMut::new(bytes);
14522        #[allow(clippy::absurd_extreme_comparisons)]
14523        #[allow(unused_comparisons)]
14524        if __tmp.remaining() < Self::ENCODED_LEN {
14525            panic!(
14526                "buffer is too small (need {} bytes, but got {})",
14527                Self::ENCODED_LEN,
14528                __tmp.remaining(),
14529            )
14530        }
14531        __tmp.put_u64_le(self.time_usec);
14532        __tmp.put_f32_le(self.xacc);
14533        __tmp.put_f32_le(self.yacc);
14534        __tmp.put_f32_le(self.zacc);
14535        __tmp.put_f32_le(self.xgyro);
14536        __tmp.put_f32_le(self.ygyro);
14537        __tmp.put_f32_le(self.zgyro);
14538        __tmp.put_f32_le(self.xmag);
14539        __tmp.put_f32_le(self.ymag);
14540        __tmp.put_f32_le(self.zmag);
14541        __tmp.put_f32_le(self.abs_pressure);
14542        __tmp.put_f32_le(self.diff_pressure);
14543        __tmp.put_f32_le(self.pressure_alt);
14544        __tmp.put_f32_le(self.temperature);
14545        __tmp.put_u16_le(self.fields_updated.bits());
14546        __tmp.put_u8(self.id);
14547        if matches!(version, MavlinkVersion::V2) {
14548            let len = __tmp.len();
14549            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14550        } else {
14551            __tmp.len()
14552        }
14553    }
14554}
14555#[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
14556#[doc = "id: 234"]
14557#[doc = "Message appropriate for high latency connections like Iridium."]
14558#[derive(Debug, Clone, PartialEq)]
14559#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14560#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14561pub struct HIGH_LATENCY_DATA {
14562    #[doc = "A bitfield for use for autopilot-specific flags."]
14563    pub custom_mode: u32,
14564    #[doc = "Latitude"]
14565    pub latitude: i32,
14566    #[doc = "Longitude"]
14567    pub longitude: i32,
14568    #[doc = "roll"]
14569    pub roll: i16,
14570    #[doc = "pitch"]
14571    pub pitch: i16,
14572    #[doc = "heading"]
14573    pub heading: u16,
14574    #[doc = "heading setpoint"]
14575    pub heading_sp: i16,
14576    #[doc = "Altitude above mean sea level"]
14577    pub altitude_amsl: i16,
14578    #[doc = "Altitude setpoint relative to the home position"]
14579    pub altitude_sp: i16,
14580    #[doc = "distance to target"]
14581    pub wp_distance: u16,
14582    #[doc = "Bitmap of enabled system modes."]
14583    pub base_mode: MavModeFlag,
14584    #[doc = "The landed state. Is set to MAV_LANDED_STATE_UNDEFINED if landed state is unknown."]
14585    pub landed_state: MavLandedState,
14586    #[doc = "throttle (percentage)"]
14587    pub throttle: i8,
14588    #[doc = "airspeed"]
14589    pub airspeed: u8,
14590    #[doc = "airspeed setpoint"]
14591    pub airspeed_sp: u8,
14592    #[doc = "groundspeed"]
14593    pub groundspeed: u8,
14594    #[doc = "climb rate"]
14595    pub climb_rate: i8,
14596    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
14597    pub gps_nsat: u8,
14598    #[doc = "GPS Fix type."]
14599    pub gps_fix_type: GpsFixType,
14600    #[doc = "Remaining battery (percentage)"]
14601    pub battery_remaining: u8,
14602    #[doc = "Autopilot temperature (degrees C)"]
14603    pub temperature: i8,
14604    #[doc = "Air temperature (degrees C) from airspeed sensor"]
14605    pub temperature_air: i8,
14606    #[doc = "failsafe (each bit represents a failsafe where 0=ok, 1=failsafe active (bit0:RC, bit1:batt, bit2:GPS, bit3:GCS, bit4:fence)"]
14607    pub failsafe: u8,
14608    #[doc = "current waypoint number"]
14609    pub wp_num: u8,
14610}
14611impl HIGH_LATENCY_DATA {
14612    pub const ENCODED_LEN: usize = 40usize;
14613    pub const DEFAULT: Self = Self {
14614        custom_mode: 0_u32,
14615        latitude: 0_i32,
14616        longitude: 0_i32,
14617        roll: 0_i16,
14618        pitch: 0_i16,
14619        heading: 0_u16,
14620        heading_sp: 0_i16,
14621        altitude_amsl: 0_i16,
14622        altitude_sp: 0_i16,
14623        wp_distance: 0_u16,
14624        base_mode: MavModeFlag::DEFAULT,
14625        landed_state: MavLandedState::DEFAULT,
14626        throttle: 0_i8,
14627        airspeed: 0_u8,
14628        airspeed_sp: 0_u8,
14629        groundspeed: 0_u8,
14630        climb_rate: 0_i8,
14631        gps_nsat: 0_u8,
14632        gps_fix_type: GpsFixType::DEFAULT,
14633        battery_remaining: 0_u8,
14634        temperature: 0_i8,
14635        temperature_air: 0_i8,
14636        failsafe: 0_u8,
14637        wp_num: 0_u8,
14638    };
14639    #[cfg(feature = "arbitrary")]
14640    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14641        use arbitrary::{Arbitrary, Unstructured};
14642        let mut buf = [0u8; 1024];
14643        rng.fill_bytes(&mut buf);
14644        let mut unstructured = Unstructured::new(&buf);
14645        Self::arbitrary(&mut unstructured).unwrap_or_default()
14646    }
14647}
14648impl Default for HIGH_LATENCY_DATA {
14649    fn default() -> Self {
14650        Self::DEFAULT.clone()
14651    }
14652}
14653impl MessageData for HIGH_LATENCY_DATA {
14654    type Message = MavMessage;
14655    const ID: u32 = 234u32;
14656    const NAME: &'static str = "HIGH_LATENCY";
14657    const EXTRA_CRC: u8 = 150u8;
14658    const ENCODED_LEN: usize = 40usize;
14659    fn deser(
14660        _version: MavlinkVersion,
14661        __input: &[u8],
14662    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14663        let avail_len = __input.len();
14664        let mut payload_buf = [0; Self::ENCODED_LEN];
14665        let mut buf = if avail_len < Self::ENCODED_LEN {
14666            payload_buf[0..avail_len].copy_from_slice(__input);
14667            Bytes::new(&payload_buf)
14668        } else {
14669            Bytes::new(__input)
14670        };
14671        let mut __struct = Self::default();
14672        __struct.custom_mode = buf.get_u32_le();
14673        __struct.latitude = buf.get_i32_le();
14674        __struct.longitude = buf.get_i32_le();
14675        __struct.roll = buf.get_i16_le();
14676        __struct.pitch = buf.get_i16_le();
14677        __struct.heading = buf.get_u16_le();
14678        __struct.heading_sp = buf.get_i16_le();
14679        __struct.altitude_amsl = buf.get_i16_le();
14680        __struct.altitude_sp = buf.get_i16_le();
14681        __struct.wp_distance = buf.get_u16_le();
14682        let tmp = buf.get_u8();
14683        __struct.base_mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
14684            ::mavlink_core::error::ParserError::InvalidFlag {
14685                flag_type: "MavModeFlag",
14686                value: tmp as u32,
14687            },
14688        )?;
14689        let tmp = buf.get_u8();
14690        __struct.landed_state =
14691            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14692                enum_type: "MavLandedState",
14693                value: tmp as u32,
14694            })?;
14695        __struct.throttle = buf.get_i8();
14696        __struct.airspeed = buf.get_u8();
14697        __struct.airspeed_sp = buf.get_u8();
14698        __struct.groundspeed = buf.get_u8();
14699        __struct.climb_rate = buf.get_i8();
14700        __struct.gps_nsat = buf.get_u8();
14701        let tmp = buf.get_u8();
14702        __struct.gps_fix_type =
14703            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14704                enum_type: "GpsFixType",
14705                value: tmp as u32,
14706            })?;
14707        __struct.battery_remaining = buf.get_u8();
14708        __struct.temperature = buf.get_i8();
14709        __struct.temperature_air = buf.get_i8();
14710        __struct.failsafe = buf.get_u8();
14711        __struct.wp_num = buf.get_u8();
14712        Ok(__struct)
14713    }
14714    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14715        let mut __tmp = BytesMut::new(bytes);
14716        #[allow(clippy::absurd_extreme_comparisons)]
14717        #[allow(unused_comparisons)]
14718        if __tmp.remaining() < Self::ENCODED_LEN {
14719            panic!(
14720                "buffer is too small (need {} bytes, but got {})",
14721                Self::ENCODED_LEN,
14722                __tmp.remaining(),
14723            )
14724        }
14725        __tmp.put_u32_le(self.custom_mode);
14726        __tmp.put_i32_le(self.latitude);
14727        __tmp.put_i32_le(self.longitude);
14728        __tmp.put_i16_le(self.roll);
14729        __tmp.put_i16_le(self.pitch);
14730        __tmp.put_u16_le(self.heading);
14731        __tmp.put_i16_le(self.heading_sp);
14732        __tmp.put_i16_le(self.altitude_amsl);
14733        __tmp.put_i16_le(self.altitude_sp);
14734        __tmp.put_u16_le(self.wp_distance);
14735        __tmp.put_u8(self.base_mode.bits());
14736        __tmp.put_u8(self.landed_state as u8);
14737        __tmp.put_i8(self.throttle);
14738        __tmp.put_u8(self.airspeed);
14739        __tmp.put_u8(self.airspeed_sp);
14740        __tmp.put_u8(self.groundspeed);
14741        __tmp.put_i8(self.climb_rate);
14742        __tmp.put_u8(self.gps_nsat);
14743        __tmp.put_u8(self.gps_fix_type as u8);
14744        __tmp.put_u8(self.battery_remaining);
14745        __tmp.put_i8(self.temperature);
14746        __tmp.put_i8(self.temperature_air);
14747        __tmp.put_u8(self.failsafe);
14748        __tmp.put_u8(self.wp_num);
14749        if matches!(version, MavlinkVersion::V2) {
14750            let len = __tmp.len();
14751            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14752        } else {
14753            __tmp.len()
14754        }
14755    }
14756}
14757#[doc = "id: 235"]
14758#[doc = "Message appropriate for high latency connections like Iridium (version 2)."]
14759#[derive(Debug, Clone, PartialEq)]
14760#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14761#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14762pub struct HIGH_LATENCY2_DATA {
14763    #[doc = "Timestamp (milliseconds since boot or Unix epoch)"]
14764    pub timestamp: u32,
14765    #[doc = "Latitude"]
14766    pub latitude: i32,
14767    #[doc = "Longitude"]
14768    pub longitude: i32,
14769    #[doc = "A bitfield for use for autopilot-specific flags (2 byte version)."]
14770    pub custom_mode: u16,
14771    #[doc = "Altitude above mean sea level"]
14772    pub altitude: i16,
14773    #[doc = "Altitude setpoint"]
14774    pub target_altitude: i16,
14775    #[doc = "Distance to target waypoint or position"]
14776    pub target_distance: u16,
14777    #[doc = "Current waypoint number"]
14778    pub wp_num: u16,
14779    #[doc = "Bitmap of failure flags."]
14780    pub failure_flags: HlFailureFlag,
14781    #[doc = "Type of the MAV (quadrotor, helicopter, etc.)"]
14782    pub mavtype: MavType,
14783    #[doc = "Autopilot type / class. Use MAV_AUTOPILOT_INVALID for components that are not flight controllers."]
14784    pub autopilot: MavAutopilot,
14785    #[doc = "Heading"]
14786    pub heading: u8,
14787    #[doc = "Heading setpoint"]
14788    pub target_heading: u8,
14789    #[doc = "Throttle"]
14790    pub throttle: u8,
14791    #[doc = "Airspeed"]
14792    pub airspeed: u8,
14793    #[doc = "Airspeed setpoint"]
14794    pub airspeed_sp: u8,
14795    #[doc = "Groundspeed"]
14796    pub groundspeed: u8,
14797    #[doc = "Windspeed"]
14798    pub windspeed: u8,
14799    #[doc = "Wind heading"]
14800    pub wind_heading: u8,
14801    #[doc = "Maximum error horizontal position since last message"]
14802    pub eph: u8,
14803    #[doc = "Maximum error vertical position since last message"]
14804    pub epv: u8,
14805    #[doc = "Air temperature"]
14806    pub temperature_air: i8,
14807    #[doc = "Maximum climb rate magnitude since last message"]
14808    pub climb_rate: i8,
14809    #[doc = "Battery level (-1 if field not provided)."]
14810    pub battery: i8,
14811    #[doc = "Field for custom payload."]
14812    pub custom0: i8,
14813    #[doc = "Field for custom payload."]
14814    pub custom1: i8,
14815    #[doc = "Field for custom payload."]
14816    pub custom2: i8,
14817}
14818impl HIGH_LATENCY2_DATA {
14819    pub const ENCODED_LEN: usize = 42usize;
14820    pub const DEFAULT: Self = Self {
14821        timestamp: 0_u32,
14822        latitude: 0_i32,
14823        longitude: 0_i32,
14824        custom_mode: 0_u16,
14825        altitude: 0_i16,
14826        target_altitude: 0_i16,
14827        target_distance: 0_u16,
14828        wp_num: 0_u16,
14829        failure_flags: HlFailureFlag::DEFAULT,
14830        mavtype: MavType::DEFAULT,
14831        autopilot: MavAutopilot::DEFAULT,
14832        heading: 0_u8,
14833        target_heading: 0_u8,
14834        throttle: 0_u8,
14835        airspeed: 0_u8,
14836        airspeed_sp: 0_u8,
14837        groundspeed: 0_u8,
14838        windspeed: 0_u8,
14839        wind_heading: 0_u8,
14840        eph: 0_u8,
14841        epv: 0_u8,
14842        temperature_air: 0_i8,
14843        climb_rate: 0_i8,
14844        battery: 0_i8,
14845        custom0: 0_i8,
14846        custom1: 0_i8,
14847        custom2: 0_i8,
14848    };
14849    #[cfg(feature = "arbitrary")]
14850    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14851        use arbitrary::{Arbitrary, Unstructured};
14852        let mut buf = [0u8; 1024];
14853        rng.fill_bytes(&mut buf);
14854        let mut unstructured = Unstructured::new(&buf);
14855        Self::arbitrary(&mut unstructured).unwrap_or_default()
14856    }
14857}
14858impl Default for HIGH_LATENCY2_DATA {
14859    fn default() -> Self {
14860        Self::DEFAULT.clone()
14861    }
14862}
14863impl MessageData for HIGH_LATENCY2_DATA {
14864    type Message = MavMessage;
14865    const ID: u32 = 235u32;
14866    const NAME: &'static str = "HIGH_LATENCY2";
14867    const EXTRA_CRC: u8 = 179u8;
14868    const ENCODED_LEN: usize = 42usize;
14869    fn deser(
14870        _version: MavlinkVersion,
14871        __input: &[u8],
14872    ) -> Result<Self, ::mavlink_core::error::ParserError> {
14873        let avail_len = __input.len();
14874        let mut payload_buf = [0; Self::ENCODED_LEN];
14875        let mut buf = if avail_len < Self::ENCODED_LEN {
14876            payload_buf[0..avail_len].copy_from_slice(__input);
14877            Bytes::new(&payload_buf)
14878        } else {
14879            Bytes::new(__input)
14880        };
14881        let mut __struct = Self::default();
14882        __struct.timestamp = buf.get_u32_le();
14883        __struct.latitude = buf.get_i32_le();
14884        __struct.longitude = buf.get_i32_le();
14885        __struct.custom_mode = buf.get_u16_le();
14886        __struct.altitude = buf.get_i16_le();
14887        __struct.target_altitude = buf.get_i16_le();
14888        __struct.target_distance = buf.get_u16_le();
14889        __struct.wp_num = buf.get_u16_le();
14890        let tmp = buf.get_u16_le();
14891        __struct.failure_flags = HlFailureFlag::from_bits(tmp & HlFailureFlag::all().bits())
14892            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
14893                flag_type: "HlFailureFlag",
14894                value: tmp as u32,
14895            })?;
14896        let tmp = buf.get_u8();
14897        __struct.mavtype =
14898            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14899                enum_type: "MavType",
14900                value: tmp as u32,
14901            })?;
14902        let tmp = buf.get_u8();
14903        __struct.autopilot =
14904            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
14905                enum_type: "MavAutopilot",
14906                value: tmp as u32,
14907            })?;
14908        __struct.heading = buf.get_u8();
14909        __struct.target_heading = buf.get_u8();
14910        __struct.throttle = buf.get_u8();
14911        __struct.airspeed = buf.get_u8();
14912        __struct.airspeed_sp = buf.get_u8();
14913        __struct.groundspeed = buf.get_u8();
14914        __struct.windspeed = buf.get_u8();
14915        __struct.wind_heading = buf.get_u8();
14916        __struct.eph = buf.get_u8();
14917        __struct.epv = buf.get_u8();
14918        __struct.temperature_air = buf.get_i8();
14919        __struct.climb_rate = buf.get_i8();
14920        __struct.battery = buf.get_i8();
14921        __struct.custom0 = buf.get_i8();
14922        __struct.custom1 = buf.get_i8();
14923        __struct.custom2 = buf.get_i8();
14924        Ok(__struct)
14925    }
14926    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
14927        let mut __tmp = BytesMut::new(bytes);
14928        #[allow(clippy::absurd_extreme_comparisons)]
14929        #[allow(unused_comparisons)]
14930        if __tmp.remaining() < Self::ENCODED_LEN {
14931            panic!(
14932                "buffer is too small (need {} bytes, but got {})",
14933                Self::ENCODED_LEN,
14934                __tmp.remaining(),
14935            )
14936        }
14937        __tmp.put_u32_le(self.timestamp);
14938        __tmp.put_i32_le(self.latitude);
14939        __tmp.put_i32_le(self.longitude);
14940        __tmp.put_u16_le(self.custom_mode);
14941        __tmp.put_i16_le(self.altitude);
14942        __tmp.put_i16_le(self.target_altitude);
14943        __tmp.put_u16_le(self.target_distance);
14944        __tmp.put_u16_le(self.wp_num);
14945        __tmp.put_u16_le(self.failure_flags.bits());
14946        __tmp.put_u8(self.mavtype as u8);
14947        __tmp.put_u8(self.autopilot as u8);
14948        __tmp.put_u8(self.heading);
14949        __tmp.put_u8(self.target_heading);
14950        __tmp.put_u8(self.throttle);
14951        __tmp.put_u8(self.airspeed);
14952        __tmp.put_u8(self.airspeed_sp);
14953        __tmp.put_u8(self.groundspeed);
14954        __tmp.put_u8(self.windspeed);
14955        __tmp.put_u8(self.wind_heading);
14956        __tmp.put_u8(self.eph);
14957        __tmp.put_u8(self.epv);
14958        __tmp.put_i8(self.temperature_air);
14959        __tmp.put_i8(self.climb_rate);
14960        __tmp.put_i8(self.battery);
14961        __tmp.put_i8(self.custom0);
14962        __tmp.put_i8(self.custom1);
14963        __tmp.put_i8(self.custom2);
14964        if matches!(version, MavlinkVersion::V2) {
14965            let len = __tmp.len();
14966            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
14967        } else {
14968            __tmp.len()
14969        }
14970    }
14971}
14972#[doc = "id: 93"]
14973#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_CONTROLS."]
14974#[derive(Debug, Clone, PartialEq)]
14975#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
14976#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
14977pub struct HIL_ACTUATOR_CONTROLS_DATA {
14978    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
14979    pub time_usec: u64,
14980    #[doc = "Flags bitmask."]
14981    pub flags: HilActuatorControlsFlags,
14982    #[doc = "Control outputs -1 .. 1. Channel assignment depends on the simulated hardware."]
14983    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
14984    pub controls: [f32; 16],
14985    #[doc = "System mode. Includes arming state."]
14986    pub mode: MavModeFlag,
14987}
14988impl HIL_ACTUATOR_CONTROLS_DATA {
14989    pub const ENCODED_LEN: usize = 81usize;
14990    pub const DEFAULT: Self = Self {
14991        time_usec: 0_u64,
14992        flags: HilActuatorControlsFlags::DEFAULT,
14993        controls: [0.0_f32; 16usize],
14994        mode: MavModeFlag::DEFAULT,
14995    };
14996    #[cfg(feature = "arbitrary")]
14997    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
14998        use arbitrary::{Arbitrary, Unstructured};
14999        let mut buf = [0u8; 1024];
15000        rng.fill_bytes(&mut buf);
15001        let mut unstructured = Unstructured::new(&buf);
15002        Self::arbitrary(&mut unstructured).unwrap_or_default()
15003    }
15004}
15005impl Default for HIL_ACTUATOR_CONTROLS_DATA {
15006    fn default() -> Self {
15007        Self::DEFAULT.clone()
15008    }
15009}
15010impl MessageData for HIL_ACTUATOR_CONTROLS_DATA {
15011    type Message = MavMessage;
15012    const ID: u32 = 93u32;
15013    const NAME: &'static str = "HIL_ACTUATOR_CONTROLS";
15014    const EXTRA_CRC: u8 = 47u8;
15015    const ENCODED_LEN: usize = 81usize;
15016    fn deser(
15017        _version: MavlinkVersion,
15018        __input: &[u8],
15019    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15020        let avail_len = __input.len();
15021        let mut payload_buf = [0; Self::ENCODED_LEN];
15022        let mut buf = if avail_len < Self::ENCODED_LEN {
15023            payload_buf[0..avail_len].copy_from_slice(__input);
15024            Bytes::new(&payload_buf)
15025        } else {
15026            Bytes::new(__input)
15027        };
15028        let mut __struct = Self::default();
15029        __struct.time_usec = buf.get_u64_le();
15030        let tmp = buf.get_u64_le();
15031        __struct.flags =
15032            HilActuatorControlsFlags::from_bits(tmp & HilActuatorControlsFlags::all().bits())
15033                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15034                    flag_type: "HilActuatorControlsFlags",
15035                    value: tmp as u32,
15036                })?;
15037        for v in &mut __struct.controls {
15038            let val = buf.get_f32_le();
15039            *v = val;
15040        }
15041        let tmp = buf.get_u8();
15042        __struct.mode = MavModeFlag::from_bits(tmp & MavModeFlag::all().bits()).ok_or(
15043            ::mavlink_core::error::ParserError::InvalidFlag {
15044                flag_type: "MavModeFlag",
15045                value: tmp as u32,
15046            },
15047        )?;
15048        Ok(__struct)
15049    }
15050    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15051        let mut __tmp = BytesMut::new(bytes);
15052        #[allow(clippy::absurd_extreme_comparisons)]
15053        #[allow(unused_comparisons)]
15054        if __tmp.remaining() < Self::ENCODED_LEN {
15055            panic!(
15056                "buffer is too small (need {} bytes, but got {})",
15057                Self::ENCODED_LEN,
15058                __tmp.remaining(),
15059            )
15060        }
15061        __tmp.put_u64_le(self.time_usec);
15062        __tmp.put_u64_le(self.flags.bits());
15063        for val in &self.controls {
15064            __tmp.put_f32_le(*val);
15065        }
15066        __tmp.put_u8(self.mode.bits());
15067        if matches!(version, MavlinkVersion::V2) {
15068            let len = __tmp.len();
15069            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15070        } else {
15071            __tmp.len()
15072        }
15073    }
15074}
15075#[doc = "id: 91"]
15076#[doc = "Sent from autopilot to simulation. Hardware in the loop control outputs. Alternative to HIL_ACTUATOR_CONTROLS."]
15077#[derive(Debug, Clone, PartialEq)]
15078#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15079#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15080pub struct HIL_CONTROLS_DATA {
15081    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15082    pub time_usec: u64,
15083    #[doc = "Control output -1 .. 1"]
15084    pub roll_ailerons: f32,
15085    #[doc = "Control output -1 .. 1"]
15086    pub pitch_elevator: f32,
15087    #[doc = "Control output -1 .. 1"]
15088    pub yaw_rudder: f32,
15089    #[doc = "Throttle 0 .. 1"]
15090    pub throttle: f32,
15091    #[doc = "Aux 1, -1 .. 1"]
15092    pub aux1: f32,
15093    #[doc = "Aux 2, -1 .. 1"]
15094    pub aux2: f32,
15095    #[doc = "Aux 3, -1 .. 1"]
15096    pub aux3: f32,
15097    #[doc = "Aux 4, -1 .. 1"]
15098    pub aux4: f32,
15099    #[doc = "System mode."]
15100    pub mode: MavMode,
15101    #[doc = "Navigation mode (MAV_NAV_MODE)"]
15102    pub nav_mode: u8,
15103}
15104impl HIL_CONTROLS_DATA {
15105    pub const ENCODED_LEN: usize = 42usize;
15106    pub const DEFAULT: Self = Self {
15107        time_usec: 0_u64,
15108        roll_ailerons: 0.0_f32,
15109        pitch_elevator: 0.0_f32,
15110        yaw_rudder: 0.0_f32,
15111        throttle: 0.0_f32,
15112        aux1: 0.0_f32,
15113        aux2: 0.0_f32,
15114        aux3: 0.0_f32,
15115        aux4: 0.0_f32,
15116        mode: MavMode::DEFAULT,
15117        nav_mode: 0_u8,
15118    };
15119    #[cfg(feature = "arbitrary")]
15120    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15121        use arbitrary::{Arbitrary, Unstructured};
15122        let mut buf = [0u8; 1024];
15123        rng.fill_bytes(&mut buf);
15124        let mut unstructured = Unstructured::new(&buf);
15125        Self::arbitrary(&mut unstructured).unwrap_or_default()
15126    }
15127}
15128impl Default for HIL_CONTROLS_DATA {
15129    fn default() -> Self {
15130        Self::DEFAULT.clone()
15131    }
15132}
15133impl MessageData for HIL_CONTROLS_DATA {
15134    type Message = MavMessage;
15135    const ID: u32 = 91u32;
15136    const NAME: &'static str = "HIL_CONTROLS";
15137    const EXTRA_CRC: u8 = 63u8;
15138    const ENCODED_LEN: usize = 42usize;
15139    fn deser(
15140        _version: MavlinkVersion,
15141        __input: &[u8],
15142    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15143        let avail_len = __input.len();
15144        let mut payload_buf = [0; Self::ENCODED_LEN];
15145        let mut buf = if avail_len < Self::ENCODED_LEN {
15146            payload_buf[0..avail_len].copy_from_slice(__input);
15147            Bytes::new(&payload_buf)
15148        } else {
15149            Bytes::new(__input)
15150        };
15151        let mut __struct = Self::default();
15152        __struct.time_usec = buf.get_u64_le();
15153        __struct.roll_ailerons = buf.get_f32_le();
15154        __struct.pitch_elevator = buf.get_f32_le();
15155        __struct.yaw_rudder = buf.get_f32_le();
15156        __struct.throttle = buf.get_f32_le();
15157        __struct.aux1 = buf.get_f32_le();
15158        __struct.aux2 = buf.get_f32_le();
15159        __struct.aux3 = buf.get_f32_le();
15160        __struct.aux4 = buf.get_f32_le();
15161        let tmp = buf.get_u8();
15162        __struct.mode =
15163            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
15164                enum_type: "MavMode",
15165                value: tmp as u32,
15166            })?;
15167        __struct.nav_mode = buf.get_u8();
15168        Ok(__struct)
15169    }
15170    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15171        let mut __tmp = BytesMut::new(bytes);
15172        #[allow(clippy::absurd_extreme_comparisons)]
15173        #[allow(unused_comparisons)]
15174        if __tmp.remaining() < Self::ENCODED_LEN {
15175            panic!(
15176                "buffer is too small (need {} bytes, but got {})",
15177                Self::ENCODED_LEN,
15178                __tmp.remaining(),
15179            )
15180        }
15181        __tmp.put_u64_le(self.time_usec);
15182        __tmp.put_f32_le(self.roll_ailerons);
15183        __tmp.put_f32_le(self.pitch_elevator);
15184        __tmp.put_f32_le(self.yaw_rudder);
15185        __tmp.put_f32_le(self.throttle);
15186        __tmp.put_f32_le(self.aux1);
15187        __tmp.put_f32_le(self.aux2);
15188        __tmp.put_f32_le(self.aux3);
15189        __tmp.put_f32_le(self.aux4);
15190        __tmp.put_u8(self.mode as u8);
15191        __tmp.put_u8(self.nav_mode);
15192        if matches!(version, MavlinkVersion::V2) {
15193            let len = __tmp.len();
15194            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15195        } else {
15196            __tmp.len()
15197        }
15198    }
15199}
15200#[doc = "id: 113"]
15201#[doc = "The global position, as returned by the Global Positioning System (GPS). This is                  NOT the global position estimate of the system, but rather a RAW sensor value. See message GLOBAL_POSITION_INT for the global position estimate."]
15202#[derive(Debug, Clone, PartialEq)]
15203#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15204#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15205pub struct HIL_GPS_DATA {
15206    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15207    pub time_usec: u64,
15208    #[doc = "Latitude (WGS84)"]
15209    pub lat: i32,
15210    #[doc = "Longitude (WGS84)"]
15211    pub lon: i32,
15212    #[doc = "Altitude (MSL). Positive for up."]
15213    pub alt: i32,
15214    #[doc = "GPS HDOP horizontal dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15215    pub eph: u16,
15216    #[doc = "GPS VDOP vertical dilution of position (unitless * 100). If unknown, set to: UINT16_MAX"]
15217    pub epv: u16,
15218    #[doc = "GPS ground speed. If unknown, set to: UINT16_MAX"]
15219    pub vel: u16,
15220    #[doc = "GPS velocity in north direction in earth-fixed NED frame"]
15221    pub vn: i16,
15222    #[doc = "GPS velocity in east direction in earth-fixed NED frame"]
15223    pub ve: i16,
15224    #[doc = "GPS velocity in down direction in earth-fixed NED frame"]
15225    pub vd: i16,
15226    #[doc = "Course over ground (NOT heading, but direction of movement), 0.0..359.99 degrees. If unknown, set to: UINT16_MAX"]
15227    pub cog: u16,
15228    #[doc = "0-1: no fix, 2: 2D fix, 3: 3D fix. Some applications will not use the value of this field unless it is at least two, so always correctly fill in the fix."]
15229    pub fix_type: u8,
15230    #[doc = "Number of satellites visible. If unknown, set to UINT8_MAX"]
15231    pub satellites_visible: u8,
15232    #[doc = "GPS ID (zero indexed). Used for multiple GPS inputs"]
15233    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15234    pub id: u8,
15235    #[doc = "Yaw of vehicle relative to Earth's North, zero means not available, use 36000 for north"]
15236    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15237    pub yaw: u16,
15238}
15239impl HIL_GPS_DATA {
15240    pub const ENCODED_LEN: usize = 39usize;
15241    pub const DEFAULT: Self = Self {
15242        time_usec: 0_u64,
15243        lat: 0_i32,
15244        lon: 0_i32,
15245        alt: 0_i32,
15246        eph: 0_u16,
15247        epv: 0_u16,
15248        vel: 0_u16,
15249        vn: 0_i16,
15250        ve: 0_i16,
15251        vd: 0_i16,
15252        cog: 0_u16,
15253        fix_type: 0_u8,
15254        satellites_visible: 0_u8,
15255        id: 0_u8,
15256        yaw: 0_u16,
15257    };
15258    #[cfg(feature = "arbitrary")]
15259    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15260        use arbitrary::{Arbitrary, Unstructured};
15261        let mut buf = [0u8; 1024];
15262        rng.fill_bytes(&mut buf);
15263        let mut unstructured = Unstructured::new(&buf);
15264        Self::arbitrary(&mut unstructured).unwrap_or_default()
15265    }
15266}
15267impl Default for HIL_GPS_DATA {
15268    fn default() -> Self {
15269        Self::DEFAULT.clone()
15270    }
15271}
15272impl MessageData for HIL_GPS_DATA {
15273    type Message = MavMessage;
15274    const ID: u32 = 113u32;
15275    const NAME: &'static str = "HIL_GPS";
15276    const EXTRA_CRC: u8 = 124u8;
15277    const ENCODED_LEN: usize = 39usize;
15278    fn deser(
15279        _version: MavlinkVersion,
15280        __input: &[u8],
15281    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15282        let avail_len = __input.len();
15283        let mut payload_buf = [0; Self::ENCODED_LEN];
15284        let mut buf = if avail_len < Self::ENCODED_LEN {
15285            payload_buf[0..avail_len].copy_from_slice(__input);
15286            Bytes::new(&payload_buf)
15287        } else {
15288            Bytes::new(__input)
15289        };
15290        let mut __struct = Self::default();
15291        __struct.time_usec = buf.get_u64_le();
15292        __struct.lat = buf.get_i32_le();
15293        __struct.lon = buf.get_i32_le();
15294        __struct.alt = buf.get_i32_le();
15295        __struct.eph = buf.get_u16_le();
15296        __struct.epv = buf.get_u16_le();
15297        __struct.vel = buf.get_u16_le();
15298        __struct.vn = buf.get_i16_le();
15299        __struct.ve = buf.get_i16_le();
15300        __struct.vd = buf.get_i16_le();
15301        __struct.cog = buf.get_u16_le();
15302        __struct.fix_type = buf.get_u8();
15303        __struct.satellites_visible = buf.get_u8();
15304        __struct.id = buf.get_u8();
15305        __struct.yaw = buf.get_u16_le();
15306        Ok(__struct)
15307    }
15308    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15309        let mut __tmp = BytesMut::new(bytes);
15310        #[allow(clippy::absurd_extreme_comparisons)]
15311        #[allow(unused_comparisons)]
15312        if __tmp.remaining() < Self::ENCODED_LEN {
15313            panic!(
15314                "buffer is too small (need {} bytes, but got {})",
15315                Self::ENCODED_LEN,
15316                __tmp.remaining(),
15317            )
15318        }
15319        __tmp.put_u64_le(self.time_usec);
15320        __tmp.put_i32_le(self.lat);
15321        __tmp.put_i32_le(self.lon);
15322        __tmp.put_i32_le(self.alt);
15323        __tmp.put_u16_le(self.eph);
15324        __tmp.put_u16_le(self.epv);
15325        __tmp.put_u16_le(self.vel);
15326        __tmp.put_i16_le(self.vn);
15327        __tmp.put_i16_le(self.ve);
15328        __tmp.put_i16_le(self.vd);
15329        __tmp.put_u16_le(self.cog);
15330        __tmp.put_u8(self.fix_type);
15331        __tmp.put_u8(self.satellites_visible);
15332        __tmp.put_u8(self.id);
15333        __tmp.put_u16_le(self.yaw);
15334        if matches!(version, MavlinkVersion::V2) {
15335            let len = __tmp.len();
15336            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15337        } else {
15338            __tmp.len()
15339        }
15340    }
15341}
15342#[doc = "id: 114"]
15343#[doc = "Simulated optical flow from a flow sensor (e.g. PX4FLOW or optical mouse sensor)."]
15344#[derive(Debug, Clone, PartialEq)]
15345#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15346#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15347pub struct HIL_OPTICAL_FLOW_DATA {
15348    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15349    pub time_usec: u64,
15350    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
15351    pub integration_time_us: u32,
15352    #[doc = "Flow in radians around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
15353    pub integrated_x: f32,
15354    #[doc = "Flow in radians around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
15355    pub integrated_y: f32,
15356    #[doc = "RH rotation around X axis"]
15357    pub integrated_xgyro: f32,
15358    #[doc = "RH rotation around Y axis"]
15359    pub integrated_ygyro: f32,
15360    #[doc = "RH rotation around Z axis"]
15361    pub integrated_zgyro: f32,
15362    #[doc = "Time since the distance was sampled."]
15363    pub time_delta_distance_us: u32,
15364    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
15365    pub distance: f32,
15366    #[doc = "Temperature"]
15367    pub temperature: i16,
15368    #[doc = "Sensor ID"]
15369    pub sensor_id: u8,
15370    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
15371    pub quality: u8,
15372}
15373impl HIL_OPTICAL_FLOW_DATA {
15374    pub const ENCODED_LEN: usize = 44usize;
15375    pub const DEFAULT: Self = Self {
15376        time_usec: 0_u64,
15377        integration_time_us: 0_u32,
15378        integrated_x: 0.0_f32,
15379        integrated_y: 0.0_f32,
15380        integrated_xgyro: 0.0_f32,
15381        integrated_ygyro: 0.0_f32,
15382        integrated_zgyro: 0.0_f32,
15383        time_delta_distance_us: 0_u32,
15384        distance: 0.0_f32,
15385        temperature: 0_i16,
15386        sensor_id: 0_u8,
15387        quality: 0_u8,
15388    };
15389    #[cfg(feature = "arbitrary")]
15390    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15391        use arbitrary::{Arbitrary, Unstructured};
15392        let mut buf = [0u8; 1024];
15393        rng.fill_bytes(&mut buf);
15394        let mut unstructured = Unstructured::new(&buf);
15395        Self::arbitrary(&mut unstructured).unwrap_or_default()
15396    }
15397}
15398impl Default for HIL_OPTICAL_FLOW_DATA {
15399    fn default() -> Self {
15400        Self::DEFAULT.clone()
15401    }
15402}
15403impl MessageData for HIL_OPTICAL_FLOW_DATA {
15404    type Message = MavMessage;
15405    const ID: u32 = 114u32;
15406    const NAME: &'static str = "HIL_OPTICAL_FLOW";
15407    const EXTRA_CRC: u8 = 237u8;
15408    const ENCODED_LEN: usize = 44usize;
15409    fn deser(
15410        _version: MavlinkVersion,
15411        __input: &[u8],
15412    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15413        let avail_len = __input.len();
15414        let mut payload_buf = [0; Self::ENCODED_LEN];
15415        let mut buf = if avail_len < Self::ENCODED_LEN {
15416            payload_buf[0..avail_len].copy_from_slice(__input);
15417            Bytes::new(&payload_buf)
15418        } else {
15419            Bytes::new(__input)
15420        };
15421        let mut __struct = Self::default();
15422        __struct.time_usec = buf.get_u64_le();
15423        __struct.integration_time_us = buf.get_u32_le();
15424        __struct.integrated_x = buf.get_f32_le();
15425        __struct.integrated_y = buf.get_f32_le();
15426        __struct.integrated_xgyro = buf.get_f32_le();
15427        __struct.integrated_ygyro = buf.get_f32_le();
15428        __struct.integrated_zgyro = buf.get_f32_le();
15429        __struct.time_delta_distance_us = buf.get_u32_le();
15430        __struct.distance = buf.get_f32_le();
15431        __struct.temperature = buf.get_i16_le();
15432        __struct.sensor_id = buf.get_u8();
15433        __struct.quality = buf.get_u8();
15434        Ok(__struct)
15435    }
15436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15437        let mut __tmp = BytesMut::new(bytes);
15438        #[allow(clippy::absurd_extreme_comparisons)]
15439        #[allow(unused_comparisons)]
15440        if __tmp.remaining() < Self::ENCODED_LEN {
15441            panic!(
15442                "buffer is too small (need {} bytes, but got {})",
15443                Self::ENCODED_LEN,
15444                __tmp.remaining(),
15445            )
15446        }
15447        __tmp.put_u64_le(self.time_usec);
15448        __tmp.put_u32_le(self.integration_time_us);
15449        __tmp.put_f32_le(self.integrated_x);
15450        __tmp.put_f32_le(self.integrated_y);
15451        __tmp.put_f32_le(self.integrated_xgyro);
15452        __tmp.put_f32_le(self.integrated_ygyro);
15453        __tmp.put_f32_le(self.integrated_zgyro);
15454        __tmp.put_u32_le(self.time_delta_distance_us);
15455        __tmp.put_f32_le(self.distance);
15456        __tmp.put_i16_le(self.temperature);
15457        __tmp.put_u8(self.sensor_id);
15458        __tmp.put_u8(self.quality);
15459        if matches!(version, MavlinkVersion::V2) {
15460            let len = __tmp.len();
15461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15462        } else {
15463            __tmp.len()
15464        }
15465    }
15466}
15467#[doc = "id: 92"]
15468#[doc = "Sent from simulation to autopilot. The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification."]
15469#[derive(Debug, Clone, PartialEq)]
15470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15472pub struct HIL_RC_INPUTS_RAW_DATA {
15473    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15474    pub time_usec: u64,
15475    #[doc = "RC channel 1 value"]
15476    pub chan1_raw: u16,
15477    #[doc = "RC channel 2 value"]
15478    pub chan2_raw: u16,
15479    #[doc = "RC channel 3 value"]
15480    pub chan3_raw: u16,
15481    #[doc = "RC channel 4 value"]
15482    pub chan4_raw: u16,
15483    #[doc = "RC channel 5 value"]
15484    pub chan5_raw: u16,
15485    #[doc = "RC channel 6 value"]
15486    pub chan6_raw: u16,
15487    #[doc = "RC channel 7 value"]
15488    pub chan7_raw: u16,
15489    #[doc = "RC channel 8 value"]
15490    pub chan8_raw: u16,
15491    #[doc = "RC channel 9 value"]
15492    pub chan9_raw: u16,
15493    #[doc = "RC channel 10 value"]
15494    pub chan10_raw: u16,
15495    #[doc = "RC channel 11 value"]
15496    pub chan11_raw: u16,
15497    #[doc = "RC channel 12 value"]
15498    pub chan12_raw: u16,
15499    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
15500    pub rssi: u8,
15501}
15502impl HIL_RC_INPUTS_RAW_DATA {
15503    pub const ENCODED_LEN: usize = 33usize;
15504    pub const DEFAULT: Self = Self {
15505        time_usec: 0_u64,
15506        chan1_raw: 0_u16,
15507        chan2_raw: 0_u16,
15508        chan3_raw: 0_u16,
15509        chan4_raw: 0_u16,
15510        chan5_raw: 0_u16,
15511        chan6_raw: 0_u16,
15512        chan7_raw: 0_u16,
15513        chan8_raw: 0_u16,
15514        chan9_raw: 0_u16,
15515        chan10_raw: 0_u16,
15516        chan11_raw: 0_u16,
15517        chan12_raw: 0_u16,
15518        rssi: 0_u8,
15519    };
15520    #[cfg(feature = "arbitrary")]
15521    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15522        use arbitrary::{Arbitrary, Unstructured};
15523        let mut buf = [0u8; 1024];
15524        rng.fill_bytes(&mut buf);
15525        let mut unstructured = Unstructured::new(&buf);
15526        Self::arbitrary(&mut unstructured).unwrap_or_default()
15527    }
15528}
15529impl Default for HIL_RC_INPUTS_RAW_DATA {
15530    fn default() -> Self {
15531        Self::DEFAULT.clone()
15532    }
15533}
15534impl MessageData for HIL_RC_INPUTS_RAW_DATA {
15535    type Message = MavMessage;
15536    const ID: u32 = 92u32;
15537    const NAME: &'static str = "HIL_RC_INPUTS_RAW";
15538    const EXTRA_CRC: u8 = 54u8;
15539    const ENCODED_LEN: usize = 33usize;
15540    fn deser(
15541        _version: MavlinkVersion,
15542        __input: &[u8],
15543    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15544        let avail_len = __input.len();
15545        let mut payload_buf = [0; Self::ENCODED_LEN];
15546        let mut buf = if avail_len < Self::ENCODED_LEN {
15547            payload_buf[0..avail_len].copy_from_slice(__input);
15548            Bytes::new(&payload_buf)
15549        } else {
15550            Bytes::new(__input)
15551        };
15552        let mut __struct = Self::default();
15553        __struct.time_usec = buf.get_u64_le();
15554        __struct.chan1_raw = buf.get_u16_le();
15555        __struct.chan2_raw = buf.get_u16_le();
15556        __struct.chan3_raw = buf.get_u16_le();
15557        __struct.chan4_raw = buf.get_u16_le();
15558        __struct.chan5_raw = buf.get_u16_le();
15559        __struct.chan6_raw = buf.get_u16_le();
15560        __struct.chan7_raw = buf.get_u16_le();
15561        __struct.chan8_raw = buf.get_u16_le();
15562        __struct.chan9_raw = buf.get_u16_le();
15563        __struct.chan10_raw = buf.get_u16_le();
15564        __struct.chan11_raw = buf.get_u16_le();
15565        __struct.chan12_raw = buf.get_u16_le();
15566        __struct.rssi = buf.get_u8();
15567        Ok(__struct)
15568    }
15569    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15570        let mut __tmp = BytesMut::new(bytes);
15571        #[allow(clippy::absurd_extreme_comparisons)]
15572        #[allow(unused_comparisons)]
15573        if __tmp.remaining() < Self::ENCODED_LEN {
15574            panic!(
15575                "buffer is too small (need {} bytes, but got {})",
15576                Self::ENCODED_LEN,
15577                __tmp.remaining(),
15578            )
15579        }
15580        __tmp.put_u64_le(self.time_usec);
15581        __tmp.put_u16_le(self.chan1_raw);
15582        __tmp.put_u16_le(self.chan2_raw);
15583        __tmp.put_u16_le(self.chan3_raw);
15584        __tmp.put_u16_le(self.chan4_raw);
15585        __tmp.put_u16_le(self.chan5_raw);
15586        __tmp.put_u16_le(self.chan6_raw);
15587        __tmp.put_u16_le(self.chan7_raw);
15588        __tmp.put_u16_le(self.chan8_raw);
15589        __tmp.put_u16_le(self.chan9_raw);
15590        __tmp.put_u16_le(self.chan10_raw);
15591        __tmp.put_u16_le(self.chan11_raw);
15592        __tmp.put_u16_le(self.chan12_raw);
15593        __tmp.put_u8(self.rssi);
15594        if matches!(version, MavlinkVersion::V2) {
15595            let len = __tmp.len();
15596            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15597        } else {
15598            __tmp.len()
15599        }
15600    }
15601}
15602#[doc = "id: 107"]
15603#[doc = "The IMU readings in SI units in NED body frame."]
15604#[derive(Debug, Clone, PartialEq)]
15605#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15606#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15607pub struct HIL_SENSOR_DATA {
15608    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15609    pub time_usec: u64,
15610    #[doc = "X acceleration"]
15611    pub xacc: f32,
15612    #[doc = "Y acceleration"]
15613    pub yacc: f32,
15614    #[doc = "Z acceleration"]
15615    pub zacc: f32,
15616    #[doc = "Angular speed around X axis in body frame"]
15617    pub xgyro: f32,
15618    #[doc = "Angular speed around Y axis in body frame"]
15619    pub ygyro: f32,
15620    #[doc = "Angular speed around Z axis in body frame"]
15621    pub zgyro: f32,
15622    #[doc = "X Magnetic field"]
15623    pub xmag: f32,
15624    #[doc = "Y Magnetic field"]
15625    pub ymag: f32,
15626    #[doc = "Z Magnetic field"]
15627    pub zmag: f32,
15628    #[doc = "Absolute pressure"]
15629    pub abs_pressure: f32,
15630    #[doc = "Differential pressure (airspeed)"]
15631    pub diff_pressure: f32,
15632    #[doc = "Altitude calculated from pressure"]
15633    pub pressure_alt: f32,
15634    #[doc = "Temperature"]
15635    pub temperature: f32,
15636    #[doc = "Bitmap for fields that have updated since last message"]
15637    pub fields_updated: HilSensorUpdatedFlags,
15638    #[doc = "Sensor ID (zero indexed). Used for multiple sensor inputs"]
15639    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
15640    pub id: u8,
15641}
15642impl HIL_SENSOR_DATA {
15643    pub const ENCODED_LEN: usize = 65usize;
15644    pub const DEFAULT: Self = Self {
15645        time_usec: 0_u64,
15646        xacc: 0.0_f32,
15647        yacc: 0.0_f32,
15648        zacc: 0.0_f32,
15649        xgyro: 0.0_f32,
15650        ygyro: 0.0_f32,
15651        zgyro: 0.0_f32,
15652        xmag: 0.0_f32,
15653        ymag: 0.0_f32,
15654        zmag: 0.0_f32,
15655        abs_pressure: 0.0_f32,
15656        diff_pressure: 0.0_f32,
15657        pressure_alt: 0.0_f32,
15658        temperature: 0.0_f32,
15659        fields_updated: HilSensorUpdatedFlags::DEFAULT,
15660        id: 0_u8,
15661    };
15662    #[cfg(feature = "arbitrary")]
15663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15664        use arbitrary::{Arbitrary, Unstructured};
15665        let mut buf = [0u8; 1024];
15666        rng.fill_bytes(&mut buf);
15667        let mut unstructured = Unstructured::new(&buf);
15668        Self::arbitrary(&mut unstructured).unwrap_or_default()
15669    }
15670}
15671impl Default for HIL_SENSOR_DATA {
15672    fn default() -> Self {
15673        Self::DEFAULT.clone()
15674    }
15675}
15676impl MessageData for HIL_SENSOR_DATA {
15677    type Message = MavMessage;
15678    const ID: u32 = 107u32;
15679    const NAME: &'static str = "HIL_SENSOR";
15680    const EXTRA_CRC: u8 = 108u8;
15681    const ENCODED_LEN: usize = 65usize;
15682    fn deser(
15683        _version: MavlinkVersion,
15684        __input: &[u8],
15685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15686        let avail_len = __input.len();
15687        let mut payload_buf = [0; Self::ENCODED_LEN];
15688        let mut buf = if avail_len < Self::ENCODED_LEN {
15689            payload_buf[0..avail_len].copy_from_slice(__input);
15690            Bytes::new(&payload_buf)
15691        } else {
15692            Bytes::new(__input)
15693        };
15694        let mut __struct = Self::default();
15695        __struct.time_usec = buf.get_u64_le();
15696        __struct.xacc = buf.get_f32_le();
15697        __struct.yacc = buf.get_f32_le();
15698        __struct.zacc = buf.get_f32_le();
15699        __struct.xgyro = buf.get_f32_le();
15700        __struct.ygyro = buf.get_f32_le();
15701        __struct.zgyro = buf.get_f32_le();
15702        __struct.xmag = buf.get_f32_le();
15703        __struct.ymag = buf.get_f32_le();
15704        __struct.zmag = buf.get_f32_le();
15705        __struct.abs_pressure = buf.get_f32_le();
15706        __struct.diff_pressure = buf.get_f32_le();
15707        __struct.pressure_alt = buf.get_f32_le();
15708        __struct.temperature = buf.get_f32_le();
15709        let tmp = buf.get_u32_le();
15710        __struct.fields_updated = HilSensorUpdatedFlags::from_bits(
15711            tmp & HilSensorUpdatedFlags::all().bits(),
15712        )
15713        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
15714            flag_type: "HilSensorUpdatedFlags",
15715            value: tmp as u32,
15716        })?;
15717        __struct.id = buf.get_u8();
15718        Ok(__struct)
15719    }
15720    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15721        let mut __tmp = BytesMut::new(bytes);
15722        #[allow(clippy::absurd_extreme_comparisons)]
15723        #[allow(unused_comparisons)]
15724        if __tmp.remaining() < Self::ENCODED_LEN {
15725            panic!(
15726                "buffer is too small (need {} bytes, but got {})",
15727                Self::ENCODED_LEN,
15728                __tmp.remaining(),
15729            )
15730        }
15731        __tmp.put_u64_le(self.time_usec);
15732        __tmp.put_f32_le(self.xacc);
15733        __tmp.put_f32_le(self.yacc);
15734        __tmp.put_f32_le(self.zacc);
15735        __tmp.put_f32_le(self.xgyro);
15736        __tmp.put_f32_le(self.ygyro);
15737        __tmp.put_f32_le(self.zgyro);
15738        __tmp.put_f32_le(self.xmag);
15739        __tmp.put_f32_le(self.ymag);
15740        __tmp.put_f32_le(self.zmag);
15741        __tmp.put_f32_le(self.abs_pressure);
15742        __tmp.put_f32_le(self.diff_pressure);
15743        __tmp.put_f32_le(self.pressure_alt);
15744        __tmp.put_f32_le(self.temperature);
15745        __tmp.put_u32_le(self.fields_updated.bits());
15746        __tmp.put_u8(self.id);
15747        if matches!(version, MavlinkVersion::V2) {
15748            let len = __tmp.len();
15749            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15750        } else {
15751            __tmp.len()
15752        }
15753    }
15754}
15755#[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
15756#[doc = "id: 90"]
15757#[doc = "Sent from simulation to autopilot. This packet is useful for high throughput applications such as hardware in the loop simulations."]
15758#[derive(Debug, Clone, PartialEq)]
15759#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15760#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15761pub struct HIL_STATE_DATA {
15762    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15763    pub time_usec: u64,
15764    #[doc = "Roll angle"]
15765    pub roll: f32,
15766    #[doc = "Pitch angle"]
15767    pub pitch: f32,
15768    #[doc = "Yaw angle"]
15769    pub yaw: f32,
15770    #[doc = "Body frame roll / phi angular speed"]
15771    pub rollspeed: f32,
15772    #[doc = "Body frame pitch / theta angular speed"]
15773    pub pitchspeed: f32,
15774    #[doc = "Body frame yaw / psi angular speed"]
15775    pub yawspeed: f32,
15776    #[doc = "Latitude"]
15777    pub lat: i32,
15778    #[doc = "Longitude"]
15779    pub lon: i32,
15780    #[doc = "Altitude"]
15781    pub alt: i32,
15782    #[doc = "Ground X Speed (Latitude)"]
15783    pub vx: i16,
15784    #[doc = "Ground Y Speed (Longitude)"]
15785    pub vy: i16,
15786    #[doc = "Ground Z Speed (Altitude)"]
15787    pub vz: i16,
15788    #[doc = "X acceleration"]
15789    pub xacc: i16,
15790    #[doc = "Y acceleration"]
15791    pub yacc: i16,
15792    #[doc = "Z acceleration"]
15793    pub zacc: i16,
15794}
15795impl HIL_STATE_DATA {
15796    pub const ENCODED_LEN: usize = 56usize;
15797    pub const DEFAULT: Self = Self {
15798        time_usec: 0_u64,
15799        roll: 0.0_f32,
15800        pitch: 0.0_f32,
15801        yaw: 0.0_f32,
15802        rollspeed: 0.0_f32,
15803        pitchspeed: 0.0_f32,
15804        yawspeed: 0.0_f32,
15805        lat: 0_i32,
15806        lon: 0_i32,
15807        alt: 0_i32,
15808        vx: 0_i16,
15809        vy: 0_i16,
15810        vz: 0_i16,
15811        xacc: 0_i16,
15812        yacc: 0_i16,
15813        zacc: 0_i16,
15814    };
15815    #[cfg(feature = "arbitrary")]
15816    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15817        use arbitrary::{Arbitrary, Unstructured};
15818        let mut buf = [0u8; 1024];
15819        rng.fill_bytes(&mut buf);
15820        let mut unstructured = Unstructured::new(&buf);
15821        Self::arbitrary(&mut unstructured).unwrap_or_default()
15822    }
15823}
15824impl Default for HIL_STATE_DATA {
15825    fn default() -> Self {
15826        Self::DEFAULT.clone()
15827    }
15828}
15829impl MessageData for HIL_STATE_DATA {
15830    type Message = MavMessage;
15831    const ID: u32 = 90u32;
15832    const NAME: &'static str = "HIL_STATE";
15833    const EXTRA_CRC: u8 = 183u8;
15834    const ENCODED_LEN: usize = 56usize;
15835    fn deser(
15836        _version: MavlinkVersion,
15837        __input: &[u8],
15838    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15839        let avail_len = __input.len();
15840        let mut payload_buf = [0; Self::ENCODED_LEN];
15841        let mut buf = if avail_len < Self::ENCODED_LEN {
15842            payload_buf[0..avail_len].copy_from_slice(__input);
15843            Bytes::new(&payload_buf)
15844        } else {
15845            Bytes::new(__input)
15846        };
15847        let mut __struct = Self::default();
15848        __struct.time_usec = buf.get_u64_le();
15849        __struct.roll = buf.get_f32_le();
15850        __struct.pitch = buf.get_f32_le();
15851        __struct.yaw = buf.get_f32_le();
15852        __struct.rollspeed = buf.get_f32_le();
15853        __struct.pitchspeed = buf.get_f32_le();
15854        __struct.yawspeed = buf.get_f32_le();
15855        __struct.lat = buf.get_i32_le();
15856        __struct.lon = buf.get_i32_le();
15857        __struct.alt = buf.get_i32_le();
15858        __struct.vx = buf.get_i16_le();
15859        __struct.vy = buf.get_i16_le();
15860        __struct.vz = buf.get_i16_le();
15861        __struct.xacc = buf.get_i16_le();
15862        __struct.yacc = buf.get_i16_le();
15863        __struct.zacc = buf.get_i16_le();
15864        Ok(__struct)
15865    }
15866    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
15867        let mut __tmp = BytesMut::new(bytes);
15868        #[allow(clippy::absurd_extreme_comparisons)]
15869        #[allow(unused_comparisons)]
15870        if __tmp.remaining() < Self::ENCODED_LEN {
15871            panic!(
15872                "buffer is too small (need {} bytes, but got {})",
15873                Self::ENCODED_LEN,
15874                __tmp.remaining(),
15875            )
15876        }
15877        __tmp.put_u64_le(self.time_usec);
15878        __tmp.put_f32_le(self.roll);
15879        __tmp.put_f32_le(self.pitch);
15880        __tmp.put_f32_le(self.yaw);
15881        __tmp.put_f32_le(self.rollspeed);
15882        __tmp.put_f32_le(self.pitchspeed);
15883        __tmp.put_f32_le(self.yawspeed);
15884        __tmp.put_i32_le(self.lat);
15885        __tmp.put_i32_le(self.lon);
15886        __tmp.put_i32_le(self.alt);
15887        __tmp.put_i16_le(self.vx);
15888        __tmp.put_i16_le(self.vy);
15889        __tmp.put_i16_le(self.vz);
15890        __tmp.put_i16_le(self.xacc);
15891        __tmp.put_i16_le(self.yacc);
15892        __tmp.put_i16_le(self.zacc);
15893        if matches!(version, MavlinkVersion::V2) {
15894            let len = __tmp.len();
15895            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
15896        } else {
15897            __tmp.len()
15898        }
15899    }
15900}
15901#[doc = "id: 115"]
15902#[doc = "Sent from simulation to autopilot, avoids in contrast to HIL_STATE singularities. This packet is useful for high throughput applications such as hardware in the loop simulations."]
15903#[derive(Debug, Clone, PartialEq)]
15904#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
15905#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
15906pub struct HIL_STATE_QUATERNION_DATA {
15907    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
15908    pub time_usec: u64,
15909    #[doc = "Vehicle attitude expressed as normalized quaternion in w, x, y, z order (with 1 0 0 0 being the null-rotation)"]
15910    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
15911    pub attitude_quaternion: [f32; 4],
15912    #[doc = "Body frame roll / phi angular speed"]
15913    pub rollspeed: f32,
15914    #[doc = "Body frame pitch / theta angular speed"]
15915    pub pitchspeed: f32,
15916    #[doc = "Body frame yaw / psi angular speed"]
15917    pub yawspeed: f32,
15918    #[doc = "Latitude"]
15919    pub lat: i32,
15920    #[doc = "Longitude"]
15921    pub lon: i32,
15922    #[doc = "Altitude"]
15923    pub alt: i32,
15924    #[doc = "Ground X Speed (Latitude)"]
15925    pub vx: i16,
15926    #[doc = "Ground Y Speed (Longitude)"]
15927    pub vy: i16,
15928    #[doc = "Ground Z Speed (Altitude)"]
15929    pub vz: i16,
15930    #[doc = "Indicated airspeed"]
15931    pub ind_airspeed: u16,
15932    #[doc = "True airspeed"]
15933    pub true_airspeed: u16,
15934    #[doc = "X acceleration"]
15935    pub xacc: i16,
15936    #[doc = "Y acceleration"]
15937    pub yacc: i16,
15938    #[doc = "Z acceleration"]
15939    pub zacc: i16,
15940}
15941impl HIL_STATE_QUATERNION_DATA {
15942    pub const ENCODED_LEN: usize = 64usize;
15943    pub const DEFAULT: Self = Self {
15944        time_usec: 0_u64,
15945        attitude_quaternion: [0.0_f32; 4usize],
15946        rollspeed: 0.0_f32,
15947        pitchspeed: 0.0_f32,
15948        yawspeed: 0.0_f32,
15949        lat: 0_i32,
15950        lon: 0_i32,
15951        alt: 0_i32,
15952        vx: 0_i16,
15953        vy: 0_i16,
15954        vz: 0_i16,
15955        ind_airspeed: 0_u16,
15956        true_airspeed: 0_u16,
15957        xacc: 0_i16,
15958        yacc: 0_i16,
15959        zacc: 0_i16,
15960    };
15961    #[cfg(feature = "arbitrary")]
15962    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
15963        use arbitrary::{Arbitrary, Unstructured};
15964        let mut buf = [0u8; 1024];
15965        rng.fill_bytes(&mut buf);
15966        let mut unstructured = Unstructured::new(&buf);
15967        Self::arbitrary(&mut unstructured).unwrap_or_default()
15968    }
15969}
15970impl Default for HIL_STATE_QUATERNION_DATA {
15971    fn default() -> Self {
15972        Self::DEFAULT.clone()
15973    }
15974}
15975impl MessageData for HIL_STATE_QUATERNION_DATA {
15976    type Message = MavMessage;
15977    const ID: u32 = 115u32;
15978    const NAME: &'static str = "HIL_STATE_QUATERNION";
15979    const EXTRA_CRC: u8 = 4u8;
15980    const ENCODED_LEN: usize = 64usize;
15981    fn deser(
15982        _version: MavlinkVersion,
15983        __input: &[u8],
15984    ) -> Result<Self, ::mavlink_core::error::ParserError> {
15985        let avail_len = __input.len();
15986        let mut payload_buf = [0; Self::ENCODED_LEN];
15987        let mut buf = if avail_len < Self::ENCODED_LEN {
15988            payload_buf[0..avail_len].copy_from_slice(__input);
15989            Bytes::new(&payload_buf)
15990        } else {
15991            Bytes::new(__input)
15992        };
15993        let mut __struct = Self::default();
15994        __struct.time_usec = buf.get_u64_le();
15995        for v in &mut __struct.attitude_quaternion {
15996            let val = buf.get_f32_le();
15997            *v = val;
15998        }
15999        __struct.rollspeed = buf.get_f32_le();
16000        __struct.pitchspeed = buf.get_f32_le();
16001        __struct.yawspeed = buf.get_f32_le();
16002        __struct.lat = buf.get_i32_le();
16003        __struct.lon = buf.get_i32_le();
16004        __struct.alt = buf.get_i32_le();
16005        __struct.vx = buf.get_i16_le();
16006        __struct.vy = buf.get_i16_le();
16007        __struct.vz = buf.get_i16_le();
16008        __struct.ind_airspeed = buf.get_u16_le();
16009        __struct.true_airspeed = buf.get_u16_le();
16010        __struct.xacc = buf.get_i16_le();
16011        __struct.yacc = buf.get_i16_le();
16012        __struct.zacc = buf.get_i16_le();
16013        Ok(__struct)
16014    }
16015    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16016        let mut __tmp = BytesMut::new(bytes);
16017        #[allow(clippy::absurd_extreme_comparisons)]
16018        #[allow(unused_comparisons)]
16019        if __tmp.remaining() < Self::ENCODED_LEN {
16020            panic!(
16021                "buffer is too small (need {} bytes, but got {})",
16022                Self::ENCODED_LEN,
16023                __tmp.remaining(),
16024            )
16025        }
16026        __tmp.put_u64_le(self.time_usec);
16027        for val in &self.attitude_quaternion {
16028            __tmp.put_f32_le(*val);
16029        }
16030        __tmp.put_f32_le(self.rollspeed);
16031        __tmp.put_f32_le(self.pitchspeed);
16032        __tmp.put_f32_le(self.yawspeed);
16033        __tmp.put_i32_le(self.lat);
16034        __tmp.put_i32_le(self.lon);
16035        __tmp.put_i32_le(self.alt);
16036        __tmp.put_i16_le(self.vx);
16037        __tmp.put_i16_le(self.vy);
16038        __tmp.put_i16_le(self.vz);
16039        __tmp.put_u16_le(self.ind_airspeed);
16040        __tmp.put_u16_le(self.true_airspeed);
16041        __tmp.put_i16_le(self.xacc);
16042        __tmp.put_i16_le(self.yacc);
16043        __tmp.put_i16_le(self.zacc);
16044        if matches!(version, MavlinkVersion::V2) {
16045            let len = __tmp.len();
16046            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16047        } else {
16048            __tmp.len()
16049        }
16050    }
16051}
16052#[doc = "id: 242"]
16053#[doc = "Contains the home position. \tThe home position is the default position that the system will return to and land on. \tThe position must be set automatically by the system during the takeoff, and may also be explicitly set using MAV_CMD_DO_SET_HOME. \tThe global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface. \tUnder normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach. \tThe approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: this message can be requested by sending the MAV_CMD_REQUEST_MESSAGE with param1=242 (or the deprecated MAV_CMD_GET_HOME_POSITION command)."]
16054#[derive(Debug, Clone, PartialEq)]
16055#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16056#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16057pub struct HOME_POSITION_DATA {
16058    #[doc = "Latitude (WGS84)"]
16059    pub latitude: i32,
16060    #[doc = "Longitude (WGS84)"]
16061    pub longitude: i32,
16062    #[doc = "Altitude (MSL). Positive for up."]
16063    pub altitude: i32,
16064    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
16065    pub x: f32,
16066    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
16067    pub y: f32,
16068    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
16069    pub z: f32,
16070    #[doc = "Quaternion indicating world-to-surface-normal and heading transformation of the takeoff position.         Used to indicate the heading and slope of the ground.         All fields should be set to NaN if an accurate quaternion for both heading and surface slope cannot be supplied."]
16071    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16072    pub q: [f32; 4],
16073    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16074    pub approach_x: f32,
16075    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16076    pub approach_y: f32,
16077    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
16078    pub approach_z: f32,
16079    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16080    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16081    pub time_usec: u64,
16082}
16083impl HOME_POSITION_DATA {
16084    pub const ENCODED_LEN: usize = 60usize;
16085    pub const DEFAULT: Self = Self {
16086        latitude: 0_i32,
16087        longitude: 0_i32,
16088        altitude: 0_i32,
16089        x: 0.0_f32,
16090        y: 0.0_f32,
16091        z: 0.0_f32,
16092        q: [0.0_f32; 4usize],
16093        approach_x: 0.0_f32,
16094        approach_y: 0.0_f32,
16095        approach_z: 0.0_f32,
16096        time_usec: 0_u64,
16097    };
16098    #[cfg(feature = "arbitrary")]
16099    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16100        use arbitrary::{Arbitrary, Unstructured};
16101        let mut buf = [0u8; 1024];
16102        rng.fill_bytes(&mut buf);
16103        let mut unstructured = Unstructured::new(&buf);
16104        Self::arbitrary(&mut unstructured).unwrap_or_default()
16105    }
16106}
16107impl Default for HOME_POSITION_DATA {
16108    fn default() -> Self {
16109        Self::DEFAULT.clone()
16110    }
16111}
16112impl MessageData for HOME_POSITION_DATA {
16113    type Message = MavMessage;
16114    const ID: u32 = 242u32;
16115    const NAME: &'static str = "HOME_POSITION";
16116    const EXTRA_CRC: u8 = 104u8;
16117    const ENCODED_LEN: usize = 60usize;
16118    fn deser(
16119        _version: MavlinkVersion,
16120        __input: &[u8],
16121    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16122        let avail_len = __input.len();
16123        let mut payload_buf = [0; Self::ENCODED_LEN];
16124        let mut buf = if avail_len < Self::ENCODED_LEN {
16125            payload_buf[0..avail_len].copy_from_slice(__input);
16126            Bytes::new(&payload_buf)
16127        } else {
16128            Bytes::new(__input)
16129        };
16130        let mut __struct = Self::default();
16131        __struct.latitude = buf.get_i32_le();
16132        __struct.longitude = buf.get_i32_le();
16133        __struct.altitude = buf.get_i32_le();
16134        __struct.x = buf.get_f32_le();
16135        __struct.y = buf.get_f32_le();
16136        __struct.z = buf.get_f32_le();
16137        for v in &mut __struct.q {
16138            let val = buf.get_f32_le();
16139            *v = val;
16140        }
16141        __struct.approach_x = buf.get_f32_le();
16142        __struct.approach_y = buf.get_f32_le();
16143        __struct.approach_z = buf.get_f32_le();
16144        __struct.time_usec = buf.get_u64_le();
16145        Ok(__struct)
16146    }
16147    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16148        let mut __tmp = BytesMut::new(bytes);
16149        #[allow(clippy::absurd_extreme_comparisons)]
16150        #[allow(unused_comparisons)]
16151        if __tmp.remaining() < Self::ENCODED_LEN {
16152            panic!(
16153                "buffer is too small (need {} bytes, but got {})",
16154                Self::ENCODED_LEN,
16155                __tmp.remaining(),
16156            )
16157        }
16158        __tmp.put_i32_le(self.latitude);
16159        __tmp.put_i32_le(self.longitude);
16160        __tmp.put_i32_le(self.altitude);
16161        __tmp.put_f32_le(self.x);
16162        __tmp.put_f32_le(self.y);
16163        __tmp.put_f32_le(self.z);
16164        for val in &self.q {
16165            __tmp.put_f32_le(*val);
16166        }
16167        __tmp.put_f32_le(self.approach_x);
16168        __tmp.put_f32_le(self.approach_y);
16169        __tmp.put_f32_le(self.approach_z);
16170        __tmp.put_u64_le(self.time_usec);
16171        if matches!(version, MavlinkVersion::V2) {
16172            let len = __tmp.len();
16173            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16174        } else {
16175            __tmp.len()
16176        }
16177    }
16178}
16179#[doc = "id: 12920"]
16180#[doc = "Temperature and humidity from hygrometer."]
16181#[derive(Debug, Clone, PartialEq)]
16182#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16183#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16184pub struct HYGROMETER_SENSOR_DATA {
16185    #[doc = "Temperature"]
16186    pub temperature: i16,
16187    #[doc = "Humidity"]
16188    pub humidity: u16,
16189    #[doc = "Hygrometer ID"]
16190    pub id: u8,
16191}
16192impl HYGROMETER_SENSOR_DATA {
16193    pub const ENCODED_LEN: usize = 5usize;
16194    pub const DEFAULT: Self = Self {
16195        temperature: 0_i16,
16196        humidity: 0_u16,
16197        id: 0_u8,
16198    };
16199    #[cfg(feature = "arbitrary")]
16200    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16201        use arbitrary::{Arbitrary, Unstructured};
16202        let mut buf = [0u8; 1024];
16203        rng.fill_bytes(&mut buf);
16204        let mut unstructured = Unstructured::new(&buf);
16205        Self::arbitrary(&mut unstructured).unwrap_or_default()
16206    }
16207}
16208impl Default for HYGROMETER_SENSOR_DATA {
16209    fn default() -> Self {
16210        Self::DEFAULT.clone()
16211    }
16212}
16213impl MessageData for HYGROMETER_SENSOR_DATA {
16214    type Message = MavMessage;
16215    const ID: u32 = 12920u32;
16216    const NAME: &'static str = "HYGROMETER_SENSOR";
16217    const EXTRA_CRC: u8 = 20u8;
16218    const ENCODED_LEN: usize = 5usize;
16219    fn deser(
16220        _version: MavlinkVersion,
16221        __input: &[u8],
16222    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16223        let avail_len = __input.len();
16224        let mut payload_buf = [0; Self::ENCODED_LEN];
16225        let mut buf = if avail_len < Self::ENCODED_LEN {
16226            payload_buf[0..avail_len].copy_from_slice(__input);
16227            Bytes::new(&payload_buf)
16228        } else {
16229            Bytes::new(__input)
16230        };
16231        let mut __struct = Self::default();
16232        __struct.temperature = buf.get_i16_le();
16233        __struct.humidity = buf.get_u16_le();
16234        __struct.id = buf.get_u8();
16235        Ok(__struct)
16236    }
16237    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16238        let mut __tmp = BytesMut::new(bytes);
16239        #[allow(clippy::absurd_extreme_comparisons)]
16240        #[allow(unused_comparisons)]
16241        if __tmp.remaining() < Self::ENCODED_LEN {
16242            panic!(
16243                "buffer is too small (need {} bytes, but got {})",
16244                Self::ENCODED_LEN,
16245                __tmp.remaining(),
16246            )
16247        }
16248        __tmp.put_i16_le(self.temperature);
16249        __tmp.put_u16_le(self.humidity);
16250        __tmp.put_u8(self.id);
16251        if matches!(version, MavlinkVersion::V2) {
16252            let len = __tmp.len();
16253            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16254        } else {
16255            __tmp.len()
16256        }
16257    }
16258}
16259#[doc = "id: 440"]
16260#[doc = "Illuminator status."]
16261#[derive(Debug, Clone, PartialEq)]
16262#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16263#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16264pub struct ILLUMINATOR_STATUS_DATA {
16265    #[doc = "Time since the start-up of the illuminator in ms"]
16266    pub uptime_ms: u32,
16267    #[doc = "Errors"]
16268    pub error_status: IlluminatorErrorFlags,
16269    #[doc = "Illuminator brightness"]
16270    pub brightness: f32,
16271    #[doc = "Illuminator strobing period in seconds"]
16272    pub strobe_period: f32,
16273    #[doc = "Illuminator strobing duty cycle"]
16274    pub strobe_duty_cycle: f32,
16275    #[doc = "Temperature in Celsius"]
16276    pub temp_c: f32,
16277    #[doc = "Minimum strobing period in seconds"]
16278    pub min_strobe_period: f32,
16279    #[doc = "Maximum strobing period in seconds"]
16280    pub max_strobe_period: f32,
16281    #[doc = "0: Illuminators OFF, 1: Illuminators ON"]
16282    pub enable: u8,
16283    #[doc = "Supported illuminator modes"]
16284    pub mode_bitmask: IlluminatorMode,
16285    #[doc = "Illuminator mode"]
16286    pub mode: IlluminatorMode,
16287}
16288impl ILLUMINATOR_STATUS_DATA {
16289    pub const ENCODED_LEN: usize = 35usize;
16290    pub const DEFAULT: Self = Self {
16291        uptime_ms: 0_u32,
16292        error_status: IlluminatorErrorFlags::DEFAULT,
16293        brightness: 0.0_f32,
16294        strobe_period: 0.0_f32,
16295        strobe_duty_cycle: 0.0_f32,
16296        temp_c: 0.0_f32,
16297        min_strobe_period: 0.0_f32,
16298        max_strobe_period: 0.0_f32,
16299        enable: 0_u8,
16300        mode_bitmask: IlluminatorMode::DEFAULT,
16301        mode: IlluminatorMode::DEFAULT,
16302    };
16303    #[cfg(feature = "arbitrary")]
16304    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16305        use arbitrary::{Arbitrary, Unstructured};
16306        let mut buf = [0u8; 1024];
16307        rng.fill_bytes(&mut buf);
16308        let mut unstructured = Unstructured::new(&buf);
16309        Self::arbitrary(&mut unstructured).unwrap_or_default()
16310    }
16311}
16312impl Default for ILLUMINATOR_STATUS_DATA {
16313    fn default() -> Self {
16314        Self::DEFAULT.clone()
16315    }
16316}
16317impl MessageData for ILLUMINATOR_STATUS_DATA {
16318    type Message = MavMessage;
16319    const ID: u32 = 440u32;
16320    const NAME: &'static str = "ILLUMINATOR_STATUS";
16321    const EXTRA_CRC: u8 = 66u8;
16322    const ENCODED_LEN: usize = 35usize;
16323    fn deser(
16324        _version: MavlinkVersion,
16325        __input: &[u8],
16326    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16327        let avail_len = __input.len();
16328        let mut payload_buf = [0; Self::ENCODED_LEN];
16329        let mut buf = if avail_len < Self::ENCODED_LEN {
16330            payload_buf[0..avail_len].copy_from_slice(__input);
16331            Bytes::new(&payload_buf)
16332        } else {
16333            Bytes::new(__input)
16334        };
16335        let mut __struct = Self::default();
16336        __struct.uptime_ms = buf.get_u32_le();
16337        let tmp = buf.get_u32_le();
16338        __struct.error_status = IlluminatorErrorFlags::from_bits(
16339            tmp & IlluminatorErrorFlags::all().bits(),
16340        )
16341        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
16342            flag_type: "IlluminatorErrorFlags",
16343            value: tmp as u32,
16344        })?;
16345        __struct.brightness = buf.get_f32_le();
16346        __struct.strobe_period = buf.get_f32_le();
16347        __struct.strobe_duty_cycle = buf.get_f32_le();
16348        __struct.temp_c = buf.get_f32_le();
16349        __struct.min_strobe_period = buf.get_f32_le();
16350        __struct.max_strobe_period = buf.get_f32_le();
16351        __struct.enable = buf.get_u8();
16352        let tmp = buf.get_u8();
16353        __struct.mode_bitmask =
16354            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16355                enum_type: "IlluminatorMode",
16356                value: tmp as u32,
16357            })?;
16358        let tmp = buf.get_u8();
16359        __struct.mode =
16360            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16361                enum_type: "IlluminatorMode",
16362                value: tmp as u32,
16363            })?;
16364        Ok(__struct)
16365    }
16366    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16367        let mut __tmp = BytesMut::new(bytes);
16368        #[allow(clippy::absurd_extreme_comparisons)]
16369        #[allow(unused_comparisons)]
16370        if __tmp.remaining() < Self::ENCODED_LEN {
16371            panic!(
16372                "buffer is too small (need {} bytes, but got {})",
16373                Self::ENCODED_LEN,
16374                __tmp.remaining(),
16375            )
16376        }
16377        __tmp.put_u32_le(self.uptime_ms);
16378        __tmp.put_u32_le(self.error_status.bits());
16379        __tmp.put_f32_le(self.brightness);
16380        __tmp.put_f32_le(self.strobe_period);
16381        __tmp.put_f32_le(self.strobe_duty_cycle);
16382        __tmp.put_f32_le(self.temp_c);
16383        __tmp.put_f32_le(self.min_strobe_period);
16384        __tmp.put_f32_le(self.max_strobe_period);
16385        __tmp.put_u8(self.enable);
16386        __tmp.put_u8(self.mode_bitmask as u8);
16387        __tmp.put_u8(self.mode as u8);
16388        if matches!(version, MavlinkVersion::V2) {
16389            let len = __tmp.len();
16390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16391        } else {
16392            __tmp.len()
16393        }
16394    }
16395}
16396#[doc = "id: 335"]
16397#[doc = "Status of the Iridium SBD link."]
16398#[derive(Debug, Clone, PartialEq)]
16399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16401pub struct ISBD_LINK_STATUS_DATA {
16402    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16403    pub timestamp: u64,
16404    #[doc = "Timestamp of the last successful sbd session. The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16405    pub last_heartbeat: u64,
16406    #[doc = "Number of failed SBD sessions."]
16407    pub failed_sessions: u16,
16408    #[doc = "Number of successful SBD sessions."]
16409    pub successful_sessions: u16,
16410    #[doc = "Signal quality equal to the number of bars displayed on the ISU signal strength indicator. Range is 0 to 5, where 0 indicates no signal and 5 indicates maximum signal strength."]
16411    pub signal_quality: u8,
16412    #[doc = "1: Ring call pending, 0: No call pending."]
16413    pub ring_pending: u8,
16414    #[doc = "1: Transmission session pending, 0: No transmission session pending."]
16415    pub tx_session_pending: u8,
16416    #[doc = "1: Receiving session pending, 0: No receiving session pending."]
16417    pub rx_session_pending: u8,
16418}
16419impl ISBD_LINK_STATUS_DATA {
16420    pub const ENCODED_LEN: usize = 24usize;
16421    pub const DEFAULT: Self = Self {
16422        timestamp: 0_u64,
16423        last_heartbeat: 0_u64,
16424        failed_sessions: 0_u16,
16425        successful_sessions: 0_u16,
16426        signal_quality: 0_u8,
16427        ring_pending: 0_u8,
16428        tx_session_pending: 0_u8,
16429        rx_session_pending: 0_u8,
16430    };
16431    #[cfg(feature = "arbitrary")]
16432    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16433        use arbitrary::{Arbitrary, Unstructured};
16434        let mut buf = [0u8; 1024];
16435        rng.fill_bytes(&mut buf);
16436        let mut unstructured = Unstructured::new(&buf);
16437        Self::arbitrary(&mut unstructured).unwrap_or_default()
16438    }
16439}
16440impl Default for ISBD_LINK_STATUS_DATA {
16441    fn default() -> Self {
16442        Self::DEFAULT.clone()
16443    }
16444}
16445impl MessageData for ISBD_LINK_STATUS_DATA {
16446    type Message = MavMessage;
16447    const ID: u32 = 335u32;
16448    const NAME: &'static str = "ISBD_LINK_STATUS";
16449    const EXTRA_CRC: u8 = 225u8;
16450    const ENCODED_LEN: usize = 24usize;
16451    fn deser(
16452        _version: MavlinkVersion,
16453        __input: &[u8],
16454    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16455        let avail_len = __input.len();
16456        let mut payload_buf = [0; Self::ENCODED_LEN];
16457        let mut buf = if avail_len < Self::ENCODED_LEN {
16458            payload_buf[0..avail_len].copy_from_slice(__input);
16459            Bytes::new(&payload_buf)
16460        } else {
16461            Bytes::new(__input)
16462        };
16463        let mut __struct = Self::default();
16464        __struct.timestamp = buf.get_u64_le();
16465        __struct.last_heartbeat = buf.get_u64_le();
16466        __struct.failed_sessions = buf.get_u16_le();
16467        __struct.successful_sessions = buf.get_u16_le();
16468        __struct.signal_quality = buf.get_u8();
16469        __struct.ring_pending = buf.get_u8();
16470        __struct.tx_session_pending = buf.get_u8();
16471        __struct.rx_session_pending = buf.get_u8();
16472        Ok(__struct)
16473    }
16474    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16475        let mut __tmp = BytesMut::new(bytes);
16476        #[allow(clippy::absurd_extreme_comparisons)]
16477        #[allow(unused_comparisons)]
16478        if __tmp.remaining() < Self::ENCODED_LEN {
16479            panic!(
16480                "buffer is too small (need {} bytes, but got {})",
16481                Self::ENCODED_LEN,
16482                __tmp.remaining(),
16483            )
16484        }
16485        __tmp.put_u64_le(self.timestamp);
16486        __tmp.put_u64_le(self.last_heartbeat);
16487        __tmp.put_u16_le(self.failed_sessions);
16488        __tmp.put_u16_le(self.successful_sessions);
16489        __tmp.put_u8(self.signal_quality);
16490        __tmp.put_u8(self.ring_pending);
16491        __tmp.put_u8(self.tx_session_pending);
16492        __tmp.put_u8(self.rx_session_pending);
16493        if matches!(version, MavlinkVersion::V2) {
16494            let len = __tmp.len();
16495            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16496        } else {
16497            __tmp.len()
16498        }
16499    }
16500}
16501#[doc = "id: 149"]
16502#[doc = "The location of a landing target. See: <https://mavlink.io/en/services/landing_target.html>."]
16503#[derive(Debug, Clone, PartialEq)]
16504#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16505#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16506pub struct LANDING_TARGET_DATA {
16507    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16508    pub time_usec: u64,
16509    #[doc = "X-axis angular offset of the target from the center of the image"]
16510    pub angle_x: f32,
16511    #[doc = "Y-axis angular offset of the target from the center of the image"]
16512    pub angle_y: f32,
16513    #[doc = "Distance to the target from the vehicle"]
16514    pub distance: f32,
16515    #[doc = "Size of target along x-axis"]
16516    pub size_x: f32,
16517    #[doc = "Size of target along y-axis"]
16518    pub size_y: f32,
16519    #[doc = "The ID of the target if multiple targets are present"]
16520    pub target_num: u8,
16521    #[doc = "Coordinate frame used for following fields."]
16522    pub frame: MavFrame,
16523    #[doc = "X Position of the landing target in MAV_FRAME"]
16524    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16525    pub x: f32,
16526    #[doc = "Y Position of the landing target in MAV_FRAME"]
16527    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16528    pub y: f32,
16529    #[doc = "Z Position of the landing target in MAV_FRAME"]
16530    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16531    pub z: f32,
16532    #[doc = "Quaternion of landing target orientation (w, x, y, z order, zero-rotation is 1, 0, 0, 0)"]
16533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16534    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16535    pub q: [f32; 4],
16536    #[doc = "Type of landing target"]
16537    #[cfg_attr(feature = "serde", serde(default))]
16538    pub mavtype: LandingTargetType,
16539    #[doc = "Boolean indicating whether the position fields (x, y, z, q, type) contain valid target position information (valid: 1, invalid: 0). Default is 0 (invalid)."]
16540    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
16541    pub position_valid: u8,
16542}
16543impl LANDING_TARGET_DATA {
16544    pub const ENCODED_LEN: usize = 60usize;
16545    pub const DEFAULT: Self = Self {
16546        time_usec: 0_u64,
16547        angle_x: 0.0_f32,
16548        angle_y: 0.0_f32,
16549        distance: 0.0_f32,
16550        size_x: 0.0_f32,
16551        size_y: 0.0_f32,
16552        target_num: 0_u8,
16553        frame: MavFrame::DEFAULT,
16554        x: 0.0_f32,
16555        y: 0.0_f32,
16556        z: 0.0_f32,
16557        q: [0.0_f32; 4usize],
16558        mavtype: LandingTargetType::DEFAULT,
16559        position_valid: 0_u8,
16560    };
16561    #[cfg(feature = "arbitrary")]
16562    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16563        use arbitrary::{Arbitrary, Unstructured};
16564        let mut buf = [0u8; 1024];
16565        rng.fill_bytes(&mut buf);
16566        let mut unstructured = Unstructured::new(&buf);
16567        Self::arbitrary(&mut unstructured).unwrap_or_default()
16568    }
16569}
16570impl Default for LANDING_TARGET_DATA {
16571    fn default() -> Self {
16572        Self::DEFAULT.clone()
16573    }
16574}
16575impl MessageData for LANDING_TARGET_DATA {
16576    type Message = MavMessage;
16577    const ID: u32 = 149u32;
16578    const NAME: &'static str = "LANDING_TARGET";
16579    const EXTRA_CRC: u8 = 200u8;
16580    const ENCODED_LEN: usize = 60usize;
16581    fn deser(
16582        _version: MavlinkVersion,
16583        __input: &[u8],
16584    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16585        let avail_len = __input.len();
16586        let mut payload_buf = [0; Self::ENCODED_LEN];
16587        let mut buf = if avail_len < Self::ENCODED_LEN {
16588            payload_buf[0..avail_len].copy_from_slice(__input);
16589            Bytes::new(&payload_buf)
16590        } else {
16591            Bytes::new(__input)
16592        };
16593        let mut __struct = Self::default();
16594        __struct.time_usec = buf.get_u64_le();
16595        __struct.angle_x = buf.get_f32_le();
16596        __struct.angle_y = buf.get_f32_le();
16597        __struct.distance = buf.get_f32_le();
16598        __struct.size_x = buf.get_f32_le();
16599        __struct.size_y = buf.get_f32_le();
16600        __struct.target_num = buf.get_u8();
16601        let tmp = buf.get_u8();
16602        __struct.frame =
16603            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16604                enum_type: "MavFrame",
16605                value: tmp as u32,
16606            })?;
16607        __struct.x = buf.get_f32_le();
16608        __struct.y = buf.get_f32_le();
16609        __struct.z = buf.get_f32_le();
16610        for v in &mut __struct.q {
16611            let val = buf.get_f32_le();
16612            *v = val;
16613        }
16614        let tmp = buf.get_u8();
16615        __struct.mavtype =
16616            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16617                enum_type: "LandingTargetType",
16618                value: tmp as u32,
16619            })?;
16620        __struct.position_valid = buf.get_u8();
16621        Ok(__struct)
16622    }
16623    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16624        let mut __tmp = BytesMut::new(bytes);
16625        #[allow(clippy::absurd_extreme_comparisons)]
16626        #[allow(unused_comparisons)]
16627        if __tmp.remaining() < Self::ENCODED_LEN {
16628            panic!(
16629                "buffer is too small (need {} bytes, but got {})",
16630                Self::ENCODED_LEN,
16631                __tmp.remaining(),
16632            )
16633        }
16634        __tmp.put_u64_le(self.time_usec);
16635        __tmp.put_f32_le(self.angle_x);
16636        __tmp.put_f32_le(self.angle_y);
16637        __tmp.put_f32_le(self.distance);
16638        __tmp.put_f32_le(self.size_x);
16639        __tmp.put_f32_le(self.size_y);
16640        __tmp.put_u8(self.target_num);
16641        __tmp.put_u8(self.frame as u8);
16642        __tmp.put_f32_le(self.x);
16643        __tmp.put_f32_le(self.y);
16644        __tmp.put_f32_le(self.z);
16645        for val in &self.q {
16646            __tmp.put_f32_le(*val);
16647        }
16648        __tmp.put_u8(self.mavtype as u8);
16649        __tmp.put_u8(self.position_valid);
16650        if matches!(version, MavlinkVersion::V2) {
16651            let len = __tmp.len();
16652            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16653        } else {
16654            __tmp.len()
16655        }
16656    }
16657}
16658#[doc = "id: 8"]
16659#[doc = "Status generated in each node in the communication chain and injected into MAVLink stream."]
16660#[derive(Debug, Clone, PartialEq)]
16661#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16662#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16663pub struct LINK_NODE_STATUS_DATA {
16664    #[doc = "Timestamp (time since system boot)."]
16665    pub timestamp: u64,
16666    #[doc = "Transmit rate"]
16667    pub tx_rate: u32,
16668    #[doc = "Receive rate"]
16669    pub rx_rate: u32,
16670    #[doc = "Messages sent"]
16671    pub messages_sent: u32,
16672    #[doc = "Messages received (estimated from counting seq)"]
16673    pub messages_received: u32,
16674    #[doc = "Messages lost (estimated from counting seq)"]
16675    pub messages_lost: u32,
16676    #[doc = "Number of bytes that could not be parsed correctly."]
16677    pub rx_parse_err: u16,
16678    #[doc = "Transmit buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16679    pub tx_overflows: u16,
16680    #[doc = "Receive buffer overflows. This number wraps around as it reaches UINT16_MAX"]
16681    pub rx_overflows: u16,
16682    #[doc = "Remaining free transmit buffer space"]
16683    pub tx_buf: u8,
16684    #[doc = "Remaining free receive buffer space"]
16685    pub rx_buf: u8,
16686}
16687impl LINK_NODE_STATUS_DATA {
16688    pub const ENCODED_LEN: usize = 36usize;
16689    pub const DEFAULT: Self = Self {
16690        timestamp: 0_u64,
16691        tx_rate: 0_u32,
16692        rx_rate: 0_u32,
16693        messages_sent: 0_u32,
16694        messages_received: 0_u32,
16695        messages_lost: 0_u32,
16696        rx_parse_err: 0_u16,
16697        tx_overflows: 0_u16,
16698        rx_overflows: 0_u16,
16699        tx_buf: 0_u8,
16700        rx_buf: 0_u8,
16701    };
16702    #[cfg(feature = "arbitrary")]
16703    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16704        use arbitrary::{Arbitrary, Unstructured};
16705        let mut buf = [0u8; 1024];
16706        rng.fill_bytes(&mut buf);
16707        let mut unstructured = Unstructured::new(&buf);
16708        Self::arbitrary(&mut unstructured).unwrap_or_default()
16709    }
16710}
16711impl Default for LINK_NODE_STATUS_DATA {
16712    fn default() -> Self {
16713        Self::DEFAULT.clone()
16714    }
16715}
16716impl MessageData for LINK_NODE_STATUS_DATA {
16717    type Message = MavMessage;
16718    const ID: u32 = 8u32;
16719    const NAME: &'static str = "LINK_NODE_STATUS";
16720    const EXTRA_CRC: u8 = 117u8;
16721    const ENCODED_LEN: usize = 36usize;
16722    fn deser(
16723        _version: MavlinkVersion,
16724        __input: &[u8],
16725    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16726        let avail_len = __input.len();
16727        let mut payload_buf = [0; Self::ENCODED_LEN];
16728        let mut buf = if avail_len < Self::ENCODED_LEN {
16729            payload_buf[0..avail_len].copy_from_slice(__input);
16730            Bytes::new(&payload_buf)
16731        } else {
16732            Bytes::new(__input)
16733        };
16734        let mut __struct = Self::default();
16735        __struct.timestamp = buf.get_u64_le();
16736        __struct.tx_rate = buf.get_u32_le();
16737        __struct.rx_rate = buf.get_u32_le();
16738        __struct.messages_sent = buf.get_u32_le();
16739        __struct.messages_received = buf.get_u32_le();
16740        __struct.messages_lost = buf.get_u32_le();
16741        __struct.rx_parse_err = buf.get_u16_le();
16742        __struct.tx_overflows = buf.get_u16_le();
16743        __struct.rx_overflows = buf.get_u16_le();
16744        __struct.tx_buf = buf.get_u8();
16745        __struct.rx_buf = buf.get_u8();
16746        Ok(__struct)
16747    }
16748    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16749        let mut __tmp = BytesMut::new(bytes);
16750        #[allow(clippy::absurd_extreme_comparisons)]
16751        #[allow(unused_comparisons)]
16752        if __tmp.remaining() < Self::ENCODED_LEN {
16753            panic!(
16754                "buffer is too small (need {} bytes, but got {})",
16755                Self::ENCODED_LEN,
16756                __tmp.remaining(),
16757            )
16758        }
16759        __tmp.put_u64_le(self.timestamp);
16760        __tmp.put_u32_le(self.tx_rate);
16761        __tmp.put_u32_le(self.rx_rate);
16762        __tmp.put_u32_le(self.messages_sent);
16763        __tmp.put_u32_le(self.messages_received);
16764        __tmp.put_u32_le(self.messages_lost);
16765        __tmp.put_u16_le(self.rx_parse_err);
16766        __tmp.put_u16_le(self.tx_overflows);
16767        __tmp.put_u16_le(self.rx_overflows);
16768        __tmp.put_u8(self.tx_buf);
16769        __tmp.put_u8(self.rx_buf);
16770        if matches!(version, MavlinkVersion::V2) {
16771            let len = __tmp.len();
16772            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16773        } else {
16774            __tmp.len()
16775        }
16776    }
16777}
16778#[doc = "id: 32"]
16779#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
16780#[derive(Debug, Clone, PartialEq)]
16781#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16782#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16783pub struct LOCAL_POSITION_NED_DATA {
16784    #[doc = "Timestamp (time since system boot)."]
16785    pub time_boot_ms: u32,
16786    #[doc = "X Position"]
16787    pub x: f32,
16788    #[doc = "Y Position"]
16789    pub y: f32,
16790    #[doc = "Z Position"]
16791    pub z: f32,
16792    #[doc = "X Speed"]
16793    pub vx: f32,
16794    #[doc = "Y Speed"]
16795    pub vy: f32,
16796    #[doc = "Z Speed"]
16797    pub vz: f32,
16798}
16799impl LOCAL_POSITION_NED_DATA {
16800    pub const ENCODED_LEN: usize = 28usize;
16801    pub const DEFAULT: Self = Self {
16802        time_boot_ms: 0_u32,
16803        x: 0.0_f32,
16804        y: 0.0_f32,
16805        z: 0.0_f32,
16806        vx: 0.0_f32,
16807        vy: 0.0_f32,
16808        vz: 0.0_f32,
16809    };
16810    #[cfg(feature = "arbitrary")]
16811    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16812        use arbitrary::{Arbitrary, Unstructured};
16813        let mut buf = [0u8; 1024];
16814        rng.fill_bytes(&mut buf);
16815        let mut unstructured = Unstructured::new(&buf);
16816        Self::arbitrary(&mut unstructured).unwrap_or_default()
16817    }
16818}
16819impl Default for LOCAL_POSITION_NED_DATA {
16820    fn default() -> Self {
16821        Self::DEFAULT.clone()
16822    }
16823}
16824impl MessageData for LOCAL_POSITION_NED_DATA {
16825    type Message = MavMessage;
16826    const ID: u32 = 32u32;
16827    const NAME: &'static str = "LOCAL_POSITION_NED";
16828    const EXTRA_CRC: u8 = 185u8;
16829    const ENCODED_LEN: usize = 28usize;
16830    fn deser(
16831        _version: MavlinkVersion,
16832        __input: &[u8],
16833    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16834        let avail_len = __input.len();
16835        let mut payload_buf = [0; Self::ENCODED_LEN];
16836        let mut buf = if avail_len < Self::ENCODED_LEN {
16837            payload_buf[0..avail_len].copy_from_slice(__input);
16838            Bytes::new(&payload_buf)
16839        } else {
16840            Bytes::new(__input)
16841        };
16842        let mut __struct = Self::default();
16843        __struct.time_boot_ms = buf.get_u32_le();
16844        __struct.x = buf.get_f32_le();
16845        __struct.y = buf.get_f32_le();
16846        __struct.z = buf.get_f32_le();
16847        __struct.vx = buf.get_f32_le();
16848        __struct.vy = buf.get_f32_le();
16849        __struct.vz = buf.get_f32_le();
16850        Ok(__struct)
16851    }
16852    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16853        let mut __tmp = BytesMut::new(bytes);
16854        #[allow(clippy::absurd_extreme_comparisons)]
16855        #[allow(unused_comparisons)]
16856        if __tmp.remaining() < Self::ENCODED_LEN {
16857            panic!(
16858                "buffer is too small (need {} bytes, but got {})",
16859                Self::ENCODED_LEN,
16860                __tmp.remaining(),
16861            )
16862        }
16863        __tmp.put_u32_le(self.time_boot_ms);
16864        __tmp.put_f32_le(self.x);
16865        __tmp.put_f32_le(self.y);
16866        __tmp.put_f32_le(self.z);
16867        __tmp.put_f32_le(self.vx);
16868        __tmp.put_f32_le(self.vy);
16869        __tmp.put_f32_le(self.vz);
16870        if matches!(version, MavlinkVersion::V2) {
16871            let len = __tmp.len();
16872            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
16873        } else {
16874            __tmp.len()
16875        }
16876    }
16877}
16878#[doc = "id: 64"]
16879#[doc = "The filtered local position (e.g. fused computer vision and accelerometers). Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
16880#[derive(Debug, Clone, PartialEq)]
16881#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
16882#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
16883pub struct LOCAL_POSITION_NED_COV_DATA {
16884    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
16885    pub time_usec: u64,
16886    #[doc = "X Position"]
16887    pub x: f32,
16888    #[doc = "Y Position"]
16889    pub y: f32,
16890    #[doc = "Z Position"]
16891    pub z: f32,
16892    #[doc = "X Speed"]
16893    pub vx: f32,
16894    #[doc = "Y Speed"]
16895    pub vy: f32,
16896    #[doc = "Z Speed"]
16897    pub vz: f32,
16898    #[doc = "X Acceleration"]
16899    pub ax: f32,
16900    #[doc = "Y Acceleration"]
16901    pub ay: f32,
16902    #[doc = "Z Acceleration"]
16903    pub az: f32,
16904    #[doc = "Row-major representation of position, velocity and acceleration 9x9 cross-covariance matrix upper right triangle (states: x, y, z, vx, vy, vz, ax, ay, az; first nine entries are the first ROW, next eight entries are the second row, etc.). If unknown, assign NaN value to first element in the array."]
16905    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
16906    pub covariance: [f32; 45],
16907    #[doc = "Class id of the estimator this estimate originated from."]
16908    pub estimator_type: MavEstimatorType,
16909}
16910impl LOCAL_POSITION_NED_COV_DATA {
16911    pub const ENCODED_LEN: usize = 225usize;
16912    pub const DEFAULT: Self = Self {
16913        time_usec: 0_u64,
16914        x: 0.0_f32,
16915        y: 0.0_f32,
16916        z: 0.0_f32,
16917        vx: 0.0_f32,
16918        vy: 0.0_f32,
16919        vz: 0.0_f32,
16920        ax: 0.0_f32,
16921        ay: 0.0_f32,
16922        az: 0.0_f32,
16923        covariance: [0.0_f32; 45usize],
16924        estimator_type: MavEstimatorType::DEFAULT,
16925    };
16926    #[cfg(feature = "arbitrary")]
16927    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
16928        use arbitrary::{Arbitrary, Unstructured};
16929        let mut buf = [0u8; 1024];
16930        rng.fill_bytes(&mut buf);
16931        let mut unstructured = Unstructured::new(&buf);
16932        Self::arbitrary(&mut unstructured).unwrap_or_default()
16933    }
16934}
16935impl Default for LOCAL_POSITION_NED_COV_DATA {
16936    fn default() -> Self {
16937        Self::DEFAULT.clone()
16938    }
16939}
16940impl MessageData for LOCAL_POSITION_NED_COV_DATA {
16941    type Message = MavMessage;
16942    const ID: u32 = 64u32;
16943    const NAME: &'static str = "LOCAL_POSITION_NED_COV";
16944    const EXTRA_CRC: u8 = 191u8;
16945    const ENCODED_LEN: usize = 225usize;
16946    fn deser(
16947        _version: MavlinkVersion,
16948        __input: &[u8],
16949    ) -> Result<Self, ::mavlink_core::error::ParserError> {
16950        let avail_len = __input.len();
16951        let mut payload_buf = [0; Self::ENCODED_LEN];
16952        let mut buf = if avail_len < Self::ENCODED_LEN {
16953            payload_buf[0..avail_len].copy_from_slice(__input);
16954            Bytes::new(&payload_buf)
16955        } else {
16956            Bytes::new(__input)
16957        };
16958        let mut __struct = Self::default();
16959        __struct.time_usec = buf.get_u64_le();
16960        __struct.x = buf.get_f32_le();
16961        __struct.y = buf.get_f32_le();
16962        __struct.z = buf.get_f32_le();
16963        __struct.vx = buf.get_f32_le();
16964        __struct.vy = buf.get_f32_le();
16965        __struct.vz = buf.get_f32_le();
16966        __struct.ax = buf.get_f32_le();
16967        __struct.ay = buf.get_f32_le();
16968        __struct.az = buf.get_f32_le();
16969        for v in &mut __struct.covariance {
16970            let val = buf.get_f32_le();
16971            *v = val;
16972        }
16973        let tmp = buf.get_u8();
16974        __struct.estimator_type =
16975            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
16976                enum_type: "MavEstimatorType",
16977                value: tmp as u32,
16978            })?;
16979        Ok(__struct)
16980    }
16981    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
16982        let mut __tmp = BytesMut::new(bytes);
16983        #[allow(clippy::absurd_extreme_comparisons)]
16984        #[allow(unused_comparisons)]
16985        if __tmp.remaining() < Self::ENCODED_LEN {
16986            panic!(
16987                "buffer is too small (need {} bytes, but got {})",
16988                Self::ENCODED_LEN,
16989                __tmp.remaining(),
16990            )
16991        }
16992        __tmp.put_u64_le(self.time_usec);
16993        __tmp.put_f32_le(self.x);
16994        __tmp.put_f32_le(self.y);
16995        __tmp.put_f32_le(self.z);
16996        __tmp.put_f32_le(self.vx);
16997        __tmp.put_f32_le(self.vy);
16998        __tmp.put_f32_le(self.vz);
16999        __tmp.put_f32_le(self.ax);
17000        __tmp.put_f32_le(self.ay);
17001        __tmp.put_f32_le(self.az);
17002        for val in &self.covariance {
17003            __tmp.put_f32_le(*val);
17004        }
17005        __tmp.put_u8(self.estimator_type as u8);
17006        if matches!(version, MavlinkVersion::V2) {
17007            let len = __tmp.len();
17008            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17009        } else {
17010            __tmp.len()
17011        }
17012    }
17013}
17014#[doc = "id: 89"]
17015#[doc = "The offset in X, Y, Z and yaw between the LOCAL_POSITION_NED messages of MAV X and the global coordinate frame in NED coordinates. Coordinate frame is right-handed, Z-axis down (aeronautical frame, NED / north-east-down convention)."]
17016#[derive(Debug, Clone, PartialEq)]
17017#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17018#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17019pub struct LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17020    #[doc = "Timestamp (time since system boot)."]
17021    pub time_boot_ms: u32,
17022    #[doc = "X Position"]
17023    pub x: f32,
17024    #[doc = "Y Position"]
17025    pub y: f32,
17026    #[doc = "Z Position"]
17027    pub z: f32,
17028    #[doc = "Roll"]
17029    pub roll: f32,
17030    #[doc = "Pitch"]
17031    pub pitch: f32,
17032    #[doc = "Yaw"]
17033    pub yaw: f32,
17034}
17035impl LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17036    pub const ENCODED_LEN: usize = 28usize;
17037    pub const DEFAULT: Self = Self {
17038        time_boot_ms: 0_u32,
17039        x: 0.0_f32,
17040        y: 0.0_f32,
17041        z: 0.0_f32,
17042        roll: 0.0_f32,
17043        pitch: 0.0_f32,
17044        yaw: 0.0_f32,
17045    };
17046    #[cfg(feature = "arbitrary")]
17047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17048        use arbitrary::{Arbitrary, Unstructured};
17049        let mut buf = [0u8; 1024];
17050        rng.fill_bytes(&mut buf);
17051        let mut unstructured = Unstructured::new(&buf);
17052        Self::arbitrary(&mut unstructured).unwrap_or_default()
17053    }
17054}
17055impl Default for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17056    fn default() -> Self {
17057        Self::DEFAULT.clone()
17058    }
17059}
17060impl MessageData for LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA {
17061    type Message = MavMessage;
17062    const ID: u32 = 89u32;
17063    const NAME: &'static str = "LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET";
17064    const EXTRA_CRC: u8 = 231u8;
17065    const ENCODED_LEN: usize = 28usize;
17066    fn deser(
17067        _version: MavlinkVersion,
17068        __input: &[u8],
17069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17070        let avail_len = __input.len();
17071        let mut payload_buf = [0; Self::ENCODED_LEN];
17072        let mut buf = if avail_len < Self::ENCODED_LEN {
17073            payload_buf[0..avail_len].copy_from_slice(__input);
17074            Bytes::new(&payload_buf)
17075        } else {
17076            Bytes::new(__input)
17077        };
17078        let mut __struct = Self::default();
17079        __struct.time_boot_ms = buf.get_u32_le();
17080        __struct.x = buf.get_f32_le();
17081        __struct.y = buf.get_f32_le();
17082        __struct.z = buf.get_f32_le();
17083        __struct.roll = buf.get_f32_le();
17084        __struct.pitch = buf.get_f32_le();
17085        __struct.yaw = buf.get_f32_le();
17086        Ok(__struct)
17087    }
17088    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17089        let mut __tmp = BytesMut::new(bytes);
17090        #[allow(clippy::absurd_extreme_comparisons)]
17091        #[allow(unused_comparisons)]
17092        if __tmp.remaining() < Self::ENCODED_LEN {
17093            panic!(
17094                "buffer is too small (need {} bytes, but got {})",
17095                Self::ENCODED_LEN,
17096                __tmp.remaining(),
17097            )
17098        }
17099        __tmp.put_u32_le(self.time_boot_ms);
17100        __tmp.put_f32_le(self.x);
17101        __tmp.put_f32_le(self.y);
17102        __tmp.put_f32_le(self.z);
17103        __tmp.put_f32_le(self.roll);
17104        __tmp.put_f32_le(self.pitch);
17105        __tmp.put_f32_le(self.yaw);
17106        if matches!(version, MavlinkVersion::V2) {
17107            let len = __tmp.len();
17108            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17109        } else {
17110            __tmp.len()
17111        }
17112    }
17113}
17114#[doc = "id: 268"]
17115#[doc = "An ack for a LOGGING_DATA_ACKED message."]
17116#[derive(Debug, Clone, PartialEq)]
17117#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17118#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17119pub struct LOGGING_ACK_DATA {
17120    #[doc = "sequence number (must match the one in LOGGING_DATA_ACKED)"]
17121    pub sequence: u16,
17122    #[doc = "system ID of the target"]
17123    pub target_system: u8,
17124    #[doc = "component ID of the target"]
17125    pub target_component: u8,
17126}
17127impl LOGGING_ACK_DATA {
17128    pub const ENCODED_LEN: usize = 4usize;
17129    pub const DEFAULT: Self = Self {
17130        sequence: 0_u16,
17131        target_system: 0_u8,
17132        target_component: 0_u8,
17133    };
17134    #[cfg(feature = "arbitrary")]
17135    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17136        use arbitrary::{Arbitrary, Unstructured};
17137        let mut buf = [0u8; 1024];
17138        rng.fill_bytes(&mut buf);
17139        let mut unstructured = Unstructured::new(&buf);
17140        Self::arbitrary(&mut unstructured).unwrap_or_default()
17141    }
17142}
17143impl Default for LOGGING_ACK_DATA {
17144    fn default() -> Self {
17145        Self::DEFAULT.clone()
17146    }
17147}
17148impl MessageData for LOGGING_ACK_DATA {
17149    type Message = MavMessage;
17150    const ID: u32 = 268u32;
17151    const NAME: &'static str = "LOGGING_ACK";
17152    const EXTRA_CRC: u8 = 14u8;
17153    const ENCODED_LEN: usize = 4usize;
17154    fn deser(
17155        _version: MavlinkVersion,
17156        __input: &[u8],
17157    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17158        let avail_len = __input.len();
17159        let mut payload_buf = [0; Self::ENCODED_LEN];
17160        let mut buf = if avail_len < Self::ENCODED_LEN {
17161            payload_buf[0..avail_len].copy_from_slice(__input);
17162            Bytes::new(&payload_buf)
17163        } else {
17164            Bytes::new(__input)
17165        };
17166        let mut __struct = Self::default();
17167        __struct.sequence = buf.get_u16_le();
17168        __struct.target_system = buf.get_u8();
17169        __struct.target_component = buf.get_u8();
17170        Ok(__struct)
17171    }
17172    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17173        let mut __tmp = BytesMut::new(bytes);
17174        #[allow(clippy::absurd_extreme_comparisons)]
17175        #[allow(unused_comparisons)]
17176        if __tmp.remaining() < Self::ENCODED_LEN {
17177            panic!(
17178                "buffer is too small (need {} bytes, but got {})",
17179                Self::ENCODED_LEN,
17180                __tmp.remaining(),
17181            )
17182        }
17183        __tmp.put_u16_le(self.sequence);
17184        __tmp.put_u8(self.target_system);
17185        __tmp.put_u8(self.target_component);
17186        if matches!(version, MavlinkVersion::V2) {
17187            let len = __tmp.len();
17188            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17189        } else {
17190            __tmp.len()
17191        }
17192    }
17193}
17194#[doc = "id: 266"]
17195#[doc = "A message containing logged data (see also MAV_CMD_LOGGING_START)."]
17196#[derive(Debug, Clone, PartialEq)]
17197#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17198#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17199pub struct LOGGING_DATA_DATA {
17200    #[doc = "sequence number (can wrap)"]
17201    pub sequence: u16,
17202    #[doc = "system ID of the target"]
17203    pub target_system: u8,
17204    #[doc = "component ID of the target"]
17205    pub target_component: u8,
17206    #[doc = "data length"]
17207    pub length: u8,
17208    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17209    pub first_message_offset: u8,
17210    #[doc = "logged data"]
17211    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17212    pub data: [u8; 249],
17213}
17214impl LOGGING_DATA_DATA {
17215    pub const ENCODED_LEN: usize = 255usize;
17216    pub const DEFAULT: Self = Self {
17217        sequence: 0_u16,
17218        target_system: 0_u8,
17219        target_component: 0_u8,
17220        length: 0_u8,
17221        first_message_offset: 0_u8,
17222        data: [0_u8; 249usize],
17223    };
17224    #[cfg(feature = "arbitrary")]
17225    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17226        use arbitrary::{Arbitrary, Unstructured};
17227        let mut buf = [0u8; 1024];
17228        rng.fill_bytes(&mut buf);
17229        let mut unstructured = Unstructured::new(&buf);
17230        Self::arbitrary(&mut unstructured).unwrap_or_default()
17231    }
17232}
17233impl Default for LOGGING_DATA_DATA {
17234    fn default() -> Self {
17235        Self::DEFAULT.clone()
17236    }
17237}
17238impl MessageData for LOGGING_DATA_DATA {
17239    type Message = MavMessage;
17240    const ID: u32 = 266u32;
17241    const NAME: &'static str = "LOGGING_DATA";
17242    const EXTRA_CRC: u8 = 193u8;
17243    const ENCODED_LEN: usize = 255usize;
17244    fn deser(
17245        _version: MavlinkVersion,
17246        __input: &[u8],
17247    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17248        let avail_len = __input.len();
17249        let mut payload_buf = [0; Self::ENCODED_LEN];
17250        let mut buf = if avail_len < Self::ENCODED_LEN {
17251            payload_buf[0..avail_len].copy_from_slice(__input);
17252            Bytes::new(&payload_buf)
17253        } else {
17254            Bytes::new(__input)
17255        };
17256        let mut __struct = Self::default();
17257        __struct.sequence = buf.get_u16_le();
17258        __struct.target_system = buf.get_u8();
17259        __struct.target_component = buf.get_u8();
17260        __struct.length = buf.get_u8();
17261        __struct.first_message_offset = buf.get_u8();
17262        for v in &mut __struct.data {
17263            let val = buf.get_u8();
17264            *v = val;
17265        }
17266        Ok(__struct)
17267    }
17268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17269        let mut __tmp = BytesMut::new(bytes);
17270        #[allow(clippy::absurd_extreme_comparisons)]
17271        #[allow(unused_comparisons)]
17272        if __tmp.remaining() < Self::ENCODED_LEN {
17273            panic!(
17274                "buffer is too small (need {} bytes, but got {})",
17275                Self::ENCODED_LEN,
17276                __tmp.remaining(),
17277            )
17278        }
17279        __tmp.put_u16_le(self.sequence);
17280        __tmp.put_u8(self.target_system);
17281        __tmp.put_u8(self.target_component);
17282        __tmp.put_u8(self.length);
17283        __tmp.put_u8(self.first_message_offset);
17284        for val in &self.data {
17285            __tmp.put_u8(*val);
17286        }
17287        if matches!(version, MavlinkVersion::V2) {
17288            let len = __tmp.len();
17289            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17290        } else {
17291            __tmp.len()
17292        }
17293    }
17294}
17295#[doc = "id: 267"]
17296#[doc = "A message containing logged data which requires a LOGGING_ACK to be sent back."]
17297#[derive(Debug, Clone, PartialEq)]
17298#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17299#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17300pub struct LOGGING_DATA_ACKED_DATA {
17301    #[doc = "sequence number (can wrap)"]
17302    pub sequence: u16,
17303    #[doc = "system ID of the target"]
17304    pub target_system: u8,
17305    #[doc = "component ID of the target"]
17306    pub target_component: u8,
17307    #[doc = "data length"]
17308    pub length: u8,
17309    #[doc = "offset into data where first message starts. This can be used for recovery, when a previous message got lost (set to UINT8_MAX if no start exists)."]
17310    pub first_message_offset: u8,
17311    #[doc = "logged data"]
17312    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17313    pub data: [u8; 249],
17314}
17315impl LOGGING_DATA_ACKED_DATA {
17316    pub const ENCODED_LEN: usize = 255usize;
17317    pub const DEFAULT: Self = Self {
17318        sequence: 0_u16,
17319        target_system: 0_u8,
17320        target_component: 0_u8,
17321        length: 0_u8,
17322        first_message_offset: 0_u8,
17323        data: [0_u8; 249usize],
17324    };
17325    #[cfg(feature = "arbitrary")]
17326    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17327        use arbitrary::{Arbitrary, Unstructured};
17328        let mut buf = [0u8; 1024];
17329        rng.fill_bytes(&mut buf);
17330        let mut unstructured = Unstructured::new(&buf);
17331        Self::arbitrary(&mut unstructured).unwrap_or_default()
17332    }
17333}
17334impl Default for LOGGING_DATA_ACKED_DATA {
17335    fn default() -> Self {
17336        Self::DEFAULT.clone()
17337    }
17338}
17339impl MessageData for LOGGING_DATA_ACKED_DATA {
17340    type Message = MavMessage;
17341    const ID: u32 = 267u32;
17342    const NAME: &'static str = "LOGGING_DATA_ACKED";
17343    const EXTRA_CRC: u8 = 35u8;
17344    const ENCODED_LEN: usize = 255usize;
17345    fn deser(
17346        _version: MavlinkVersion,
17347        __input: &[u8],
17348    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17349        let avail_len = __input.len();
17350        let mut payload_buf = [0; Self::ENCODED_LEN];
17351        let mut buf = if avail_len < Self::ENCODED_LEN {
17352            payload_buf[0..avail_len].copy_from_slice(__input);
17353            Bytes::new(&payload_buf)
17354        } else {
17355            Bytes::new(__input)
17356        };
17357        let mut __struct = Self::default();
17358        __struct.sequence = buf.get_u16_le();
17359        __struct.target_system = buf.get_u8();
17360        __struct.target_component = buf.get_u8();
17361        __struct.length = buf.get_u8();
17362        __struct.first_message_offset = buf.get_u8();
17363        for v in &mut __struct.data {
17364            let val = buf.get_u8();
17365            *v = val;
17366        }
17367        Ok(__struct)
17368    }
17369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17370        let mut __tmp = BytesMut::new(bytes);
17371        #[allow(clippy::absurd_extreme_comparisons)]
17372        #[allow(unused_comparisons)]
17373        if __tmp.remaining() < Self::ENCODED_LEN {
17374            panic!(
17375                "buffer is too small (need {} bytes, but got {})",
17376                Self::ENCODED_LEN,
17377                __tmp.remaining(),
17378            )
17379        }
17380        __tmp.put_u16_le(self.sequence);
17381        __tmp.put_u8(self.target_system);
17382        __tmp.put_u8(self.target_component);
17383        __tmp.put_u8(self.length);
17384        __tmp.put_u8(self.first_message_offset);
17385        for val in &self.data {
17386            __tmp.put_u8(*val);
17387        }
17388        if matches!(version, MavlinkVersion::V2) {
17389            let len = __tmp.len();
17390            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17391        } else {
17392            __tmp.len()
17393        }
17394    }
17395}
17396#[doc = "id: 120"]
17397#[doc = "Reply to LOG_REQUEST_DATA."]
17398#[derive(Debug, Clone, PartialEq)]
17399#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17400#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17401pub struct LOG_DATA_DATA {
17402    #[doc = "Offset into the log"]
17403    pub ofs: u32,
17404    #[doc = "Log id (from LOG_ENTRY reply)"]
17405    pub id: u16,
17406    #[doc = "Number of bytes (zero for end of log)"]
17407    pub count: u8,
17408    #[doc = "log data"]
17409    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
17410    pub data: [u8; 90],
17411}
17412impl LOG_DATA_DATA {
17413    pub const ENCODED_LEN: usize = 97usize;
17414    pub const DEFAULT: Self = Self {
17415        ofs: 0_u32,
17416        id: 0_u16,
17417        count: 0_u8,
17418        data: [0_u8; 90usize],
17419    };
17420    #[cfg(feature = "arbitrary")]
17421    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17422        use arbitrary::{Arbitrary, Unstructured};
17423        let mut buf = [0u8; 1024];
17424        rng.fill_bytes(&mut buf);
17425        let mut unstructured = Unstructured::new(&buf);
17426        Self::arbitrary(&mut unstructured).unwrap_or_default()
17427    }
17428}
17429impl Default for LOG_DATA_DATA {
17430    fn default() -> Self {
17431        Self::DEFAULT.clone()
17432    }
17433}
17434impl MessageData for LOG_DATA_DATA {
17435    type Message = MavMessage;
17436    const ID: u32 = 120u32;
17437    const NAME: &'static str = "LOG_DATA";
17438    const EXTRA_CRC: u8 = 134u8;
17439    const ENCODED_LEN: usize = 97usize;
17440    fn deser(
17441        _version: MavlinkVersion,
17442        __input: &[u8],
17443    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17444        let avail_len = __input.len();
17445        let mut payload_buf = [0; Self::ENCODED_LEN];
17446        let mut buf = if avail_len < Self::ENCODED_LEN {
17447            payload_buf[0..avail_len].copy_from_slice(__input);
17448            Bytes::new(&payload_buf)
17449        } else {
17450            Bytes::new(__input)
17451        };
17452        let mut __struct = Self::default();
17453        __struct.ofs = buf.get_u32_le();
17454        __struct.id = buf.get_u16_le();
17455        __struct.count = buf.get_u8();
17456        for v in &mut __struct.data {
17457            let val = buf.get_u8();
17458            *v = val;
17459        }
17460        Ok(__struct)
17461    }
17462    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17463        let mut __tmp = BytesMut::new(bytes);
17464        #[allow(clippy::absurd_extreme_comparisons)]
17465        #[allow(unused_comparisons)]
17466        if __tmp.remaining() < Self::ENCODED_LEN {
17467            panic!(
17468                "buffer is too small (need {} bytes, but got {})",
17469                Self::ENCODED_LEN,
17470                __tmp.remaining(),
17471            )
17472        }
17473        __tmp.put_u32_le(self.ofs);
17474        __tmp.put_u16_le(self.id);
17475        __tmp.put_u8(self.count);
17476        for val in &self.data {
17477            __tmp.put_u8(*val);
17478        }
17479        if matches!(version, MavlinkVersion::V2) {
17480            let len = __tmp.len();
17481            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17482        } else {
17483            __tmp.len()
17484        }
17485    }
17486}
17487#[doc = "id: 118"]
17488#[doc = "Reply to LOG_REQUEST_LIST."]
17489#[derive(Debug, Clone, PartialEq)]
17490#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17491#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17492pub struct LOG_ENTRY_DATA {
17493    #[doc = "UTC timestamp of log since 1970, or 0 if not available"]
17494    pub time_utc: u32,
17495    #[doc = "Size of the log (may be approximate)"]
17496    pub size: u32,
17497    #[doc = "Log id"]
17498    pub id: u16,
17499    #[doc = "Total number of logs"]
17500    pub num_logs: u16,
17501    #[doc = "High log number"]
17502    pub last_log_num: u16,
17503}
17504impl LOG_ENTRY_DATA {
17505    pub const ENCODED_LEN: usize = 14usize;
17506    pub const DEFAULT: Self = Self {
17507        time_utc: 0_u32,
17508        size: 0_u32,
17509        id: 0_u16,
17510        num_logs: 0_u16,
17511        last_log_num: 0_u16,
17512    };
17513    #[cfg(feature = "arbitrary")]
17514    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17515        use arbitrary::{Arbitrary, Unstructured};
17516        let mut buf = [0u8; 1024];
17517        rng.fill_bytes(&mut buf);
17518        let mut unstructured = Unstructured::new(&buf);
17519        Self::arbitrary(&mut unstructured).unwrap_or_default()
17520    }
17521}
17522impl Default for LOG_ENTRY_DATA {
17523    fn default() -> Self {
17524        Self::DEFAULT.clone()
17525    }
17526}
17527impl MessageData for LOG_ENTRY_DATA {
17528    type Message = MavMessage;
17529    const ID: u32 = 118u32;
17530    const NAME: &'static str = "LOG_ENTRY";
17531    const EXTRA_CRC: u8 = 56u8;
17532    const ENCODED_LEN: usize = 14usize;
17533    fn deser(
17534        _version: MavlinkVersion,
17535        __input: &[u8],
17536    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17537        let avail_len = __input.len();
17538        let mut payload_buf = [0; Self::ENCODED_LEN];
17539        let mut buf = if avail_len < Self::ENCODED_LEN {
17540            payload_buf[0..avail_len].copy_from_slice(__input);
17541            Bytes::new(&payload_buf)
17542        } else {
17543            Bytes::new(__input)
17544        };
17545        let mut __struct = Self::default();
17546        __struct.time_utc = buf.get_u32_le();
17547        __struct.size = buf.get_u32_le();
17548        __struct.id = buf.get_u16_le();
17549        __struct.num_logs = buf.get_u16_le();
17550        __struct.last_log_num = buf.get_u16_le();
17551        Ok(__struct)
17552    }
17553    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17554        let mut __tmp = BytesMut::new(bytes);
17555        #[allow(clippy::absurd_extreme_comparisons)]
17556        #[allow(unused_comparisons)]
17557        if __tmp.remaining() < Self::ENCODED_LEN {
17558            panic!(
17559                "buffer is too small (need {} bytes, but got {})",
17560                Self::ENCODED_LEN,
17561                __tmp.remaining(),
17562            )
17563        }
17564        __tmp.put_u32_le(self.time_utc);
17565        __tmp.put_u32_le(self.size);
17566        __tmp.put_u16_le(self.id);
17567        __tmp.put_u16_le(self.num_logs);
17568        __tmp.put_u16_le(self.last_log_num);
17569        if matches!(version, MavlinkVersion::V2) {
17570            let len = __tmp.len();
17571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17572        } else {
17573            __tmp.len()
17574        }
17575    }
17576}
17577#[doc = "id: 121"]
17578#[doc = "Erase all logs."]
17579#[derive(Debug, Clone, PartialEq)]
17580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17582pub struct LOG_ERASE_DATA {
17583    #[doc = "System ID"]
17584    pub target_system: u8,
17585    #[doc = "Component ID"]
17586    pub target_component: u8,
17587}
17588impl LOG_ERASE_DATA {
17589    pub const ENCODED_LEN: usize = 2usize;
17590    pub const DEFAULT: Self = Self {
17591        target_system: 0_u8,
17592        target_component: 0_u8,
17593    };
17594    #[cfg(feature = "arbitrary")]
17595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17596        use arbitrary::{Arbitrary, Unstructured};
17597        let mut buf = [0u8; 1024];
17598        rng.fill_bytes(&mut buf);
17599        let mut unstructured = Unstructured::new(&buf);
17600        Self::arbitrary(&mut unstructured).unwrap_or_default()
17601    }
17602}
17603impl Default for LOG_ERASE_DATA {
17604    fn default() -> Self {
17605        Self::DEFAULT.clone()
17606    }
17607}
17608impl MessageData for LOG_ERASE_DATA {
17609    type Message = MavMessage;
17610    const ID: u32 = 121u32;
17611    const NAME: &'static str = "LOG_ERASE";
17612    const EXTRA_CRC: u8 = 237u8;
17613    const ENCODED_LEN: usize = 2usize;
17614    fn deser(
17615        _version: MavlinkVersion,
17616        __input: &[u8],
17617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17618        let avail_len = __input.len();
17619        let mut payload_buf = [0; Self::ENCODED_LEN];
17620        let mut buf = if avail_len < Self::ENCODED_LEN {
17621            payload_buf[0..avail_len].copy_from_slice(__input);
17622            Bytes::new(&payload_buf)
17623        } else {
17624            Bytes::new(__input)
17625        };
17626        let mut __struct = Self::default();
17627        __struct.target_system = buf.get_u8();
17628        __struct.target_component = buf.get_u8();
17629        Ok(__struct)
17630    }
17631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17632        let mut __tmp = BytesMut::new(bytes);
17633        #[allow(clippy::absurd_extreme_comparisons)]
17634        #[allow(unused_comparisons)]
17635        if __tmp.remaining() < Self::ENCODED_LEN {
17636            panic!(
17637                "buffer is too small (need {} bytes, but got {})",
17638                Self::ENCODED_LEN,
17639                __tmp.remaining(),
17640            )
17641        }
17642        __tmp.put_u8(self.target_system);
17643        __tmp.put_u8(self.target_component);
17644        if matches!(version, MavlinkVersion::V2) {
17645            let len = __tmp.len();
17646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17647        } else {
17648            __tmp.len()
17649        }
17650    }
17651}
17652#[doc = "id: 119"]
17653#[doc = "Request a chunk of a log."]
17654#[derive(Debug, Clone, PartialEq)]
17655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17657pub struct LOG_REQUEST_DATA_DATA {
17658    #[doc = "Offset into the log"]
17659    pub ofs: u32,
17660    #[doc = "Number of bytes"]
17661    pub count: u32,
17662    #[doc = "Log id (from LOG_ENTRY reply)"]
17663    pub id: u16,
17664    #[doc = "System ID"]
17665    pub target_system: u8,
17666    #[doc = "Component ID"]
17667    pub target_component: u8,
17668}
17669impl LOG_REQUEST_DATA_DATA {
17670    pub const ENCODED_LEN: usize = 12usize;
17671    pub const DEFAULT: Self = Self {
17672        ofs: 0_u32,
17673        count: 0_u32,
17674        id: 0_u16,
17675        target_system: 0_u8,
17676        target_component: 0_u8,
17677    };
17678    #[cfg(feature = "arbitrary")]
17679    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17680        use arbitrary::{Arbitrary, Unstructured};
17681        let mut buf = [0u8; 1024];
17682        rng.fill_bytes(&mut buf);
17683        let mut unstructured = Unstructured::new(&buf);
17684        Self::arbitrary(&mut unstructured).unwrap_or_default()
17685    }
17686}
17687impl Default for LOG_REQUEST_DATA_DATA {
17688    fn default() -> Self {
17689        Self::DEFAULT.clone()
17690    }
17691}
17692impl MessageData for LOG_REQUEST_DATA_DATA {
17693    type Message = MavMessage;
17694    const ID: u32 = 119u32;
17695    const NAME: &'static str = "LOG_REQUEST_DATA";
17696    const EXTRA_CRC: u8 = 116u8;
17697    const ENCODED_LEN: usize = 12usize;
17698    fn deser(
17699        _version: MavlinkVersion,
17700        __input: &[u8],
17701    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17702        let avail_len = __input.len();
17703        let mut payload_buf = [0; Self::ENCODED_LEN];
17704        let mut buf = if avail_len < Self::ENCODED_LEN {
17705            payload_buf[0..avail_len].copy_from_slice(__input);
17706            Bytes::new(&payload_buf)
17707        } else {
17708            Bytes::new(__input)
17709        };
17710        let mut __struct = Self::default();
17711        __struct.ofs = buf.get_u32_le();
17712        __struct.count = buf.get_u32_le();
17713        __struct.id = buf.get_u16_le();
17714        __struct.target_system = buf.get_u8();
17715        __struct.target_component = buf.get_u8();
17716        Ok(__struct)
17717    }
17718    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17719        let mut __tmp = BytesMut::new(bytes);
17720        #[allow(clippy::absurd_extreme_comparisons)]
17721        #[allow(unused_comparisons)]
17722        if __tmp.remaining() < Self::ENCODED_LEN {
17723            panic!(
17724                "buffer is too small (need {} bytes, but got {})",
17725                Self::ENCODED_LEN,
17726                __tmp.remaining(),
17727            )
17728        }
17729        __tmp.put_u32_le(self.ofs);
17730        __tmp.put_u32_le(self.count);
17731        __tmp.put_u16_le(self.id);
17732        __tmp.put_u8(self.target_system);
17733        __tmp.put_u8(self.target_component);
17734        if matches!(version, MavlinkVersion::V2) {
17735            let len = __tmp.len();
17736            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17737        } else {
17738            __tmp.len()
17739        }
17740    }
17741}
17742#[doc = "id: 122"]
17743#[doc = "Stop log transfer and resume normal logging."]
17744#[derive(Debug, Clone, PartialEq)]
17745#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17746#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17747pub struct LOG_REQUEST_END_DATA {
17748    #[doc = "System ID"]
17749    pub target_system: u8,
17750    #[doc = "Component ID"]
17751    pub target_component: u8,
17752}
17753impl LOG_REQUEST_END_DATA {
17754    pub const ENCODED_LEN: usize = 2usize;
17755    pub const DEFAULT: Self = Self {
17756        target_system: 0_u8,
17757        target_component: 0_u8,
17758    };
17759    #[cfg(feature = "arbitrary")]
17760    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17761        use arbitrary::{Arbitrary, Unstructured};
17762        let mut buf = [0u8; 1024];
17763        rng.fill_bytes(&mut buf);
17764        let mut unstructured = Unstructured::new(&buf);
17765        Self::arbitrary(&mut unstructured).unwrap_or_default()
17766    }
17767}
17768impl Default for LOG_REQUEST_END_DATA {
17769    fn default() -> Self {
17770        Self::DEFAULT.clone()
17771    }
17772}
17773impl MessageData for LOG_REQUEST_END_DATA {
17774    type Message = MavMessage;
17775    const ID: u32 = 122u32;
17776    const NAME: &'static str = "LOG_REQUEST_END";
17777    const EXTRA_CRC: u8 = 203u8;
17778    const ENCODED_LEN: usize = 2usize;
17779    fn deser(
17780        _version: MavlinkVersion,
17781        __input: &[u8],
17782    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17783        let avail_len = __input.len();
17784        let mut payload_buf = [0; Self::ENCODED_LEN];
17785        let mut buf = if avail_len < Self::ENCODED_LEN {
17786            payload_buf[0..avail_len].copy_from_slice(__input);
17787            Bytes::new(&payload_buf)
17788        } else {
17789            Bytes::new(__input)
17790        };
17791        let mut __struct = Self::default();
17792        __struct.target_system = buf.get_u8();
17793        __struct.target_component = buf.get_u8();
17794        Ok(__struct)
17795    }
17796    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17797        let mut __tmp = BytesMut::new(bytes);
17798        #[allow(clippy::absurd_extreme_comparisons)]
17799        #[allow(unused_comparisons)]
17800        if __tmp.remaining() < Self::ENCODED_LEN {
17801            panic!(
17802                "buffer is too small (need {} bytes, but got {})",
17803                Self::ENCODED_LEN,
17804                __tmp.remaining(),
17805            )
17806        }
17807        __tmp.put_u8(self.target_system);
17808        __tmp.put_u8(self.target_component);
17809        if matches!(version, MavlinkVersion::V2) {
17810            let len = __tmp.len();
17811            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17812        } else {
17813            __tmp.len()
17814        }
17815    }
17816}
17817#[doc = "id: 117"]
17818#[doc = "Request a list of available logs. On some systems calling this may stop on-board logging until LOG_REQUEST_END is called. If there are no log files available this request shall be answered with one LOG_ENTRY message with id = 0 and num_logs = 0."]
17819#[derive(Debug, Clone, PartialEq)]
17820#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17821#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17822pub struct LOG_REQUEST_LIST_DATA {
17823    #[doc = "First log id (0 for first available)"]
17824    pub start: u16,
17825    #[doc = "Last log id (0xffff for last available)"]
17826    pub end: u16,
17827    #[doc = "System ID"]
17828    pub target_system: u8,
17829    #[doc = "Component ID"]
17830    pub target_component: u8,
17831}
17832impl LOG_REQUEST_LIST_DATA {
17833    pub const ENCODED_LEN: usize = 6usize;
17834    pub const DEFAULT: Self = Self {
17835        start: 0_u16,
17836        end: 0_u16,
17837        target_system: 0_u8,
17838        target_component: 0_u8,
17839    };
17840    #[cfg(feature = "arbitrary")]
17841    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17842        use arbitrary::{Arbitrary, Unstructured};
17843        let mut buf = [0u8; 1024];
17844        rng.fill_bytes(&mut buf);
17845        let mut unstructured = Unstructured::new(&buf);
17846        Self::arbitrary(&mut unstructured).unwrap_or_default()
17847    }
17848}
17849impl Default for LOG_REQUEST_LIST_DATA {
17850    fn default() -> Self {
17851        Self::DEFAULT.clone()
17852    }
17853}
17854impl MessageData for LOG_REQUEST_LIST_DATA {
17855    type Message = MavMessage;
17856    const ID: u32 = 117u32;
17857    const NAME: &'static str = "LOG_REQUEST_LIST";
17858    const EXTRA_CRC: u8 = 128u8;
17859    const ENCODED_LEN: usize = 6usize;
17860    fn deser(
17861        _version: MavlinkVersion,
17862        __input: &[u8],
17863    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17864        let avail_len = __input.len();
17865        let mut payload_buf = [0; Self::ENCODED_LEN];
17866        let mut buf = if avail_len < Self::ENCODED_LEN {
17867            payload_buf[0..avail_len].copy_from_slice(__input);
17868            Bytes::new(&payload_buf)
17869        } else {
17870            Bytes::new(__input)
17871        };
17872        let mut __struct = Self::default();
17873        __struct.start = buf.get_u16_le();
17874        __struct.end = buf.get_u16_le();
17875        __struct.target_system = buf.get_u8();
17876        __struct.target_component = buf.get_u8();
17877        Ok(__struct)
17878    }
17879    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
17880        let mut __tmp = BytesMut::new(bytes);
17881        #[allow(clippy::absurd_extreme_comparisons)]
17882        #[allow(unused_comparisons)]
17883        if __tmp.remaining() < Self::ENCODED_LEN {
17884            panic!(
17885                "buffer is too small (need {} bytes, but got {})",
17886                Self::ENCODED_LEN,
17887                __tmp.remaining(),
17888            )
17889        }
17890        __tmp.put_u16_le(self.start);
17891        __tmp.put_u16_le(self.end);
17892        __tmp.put_u8(self.target_system);
17893        __tmp.put_u8(self.target_component);
17894        if matches!(version, MavlinkVersion::V2) {
17895            let len = __tmp.len();
17896            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
17897        } else {
17898            __tmp.len()
17899        }
17900    }
17901}
17902#[doc = "id: 192"]
17903#[doc = "Reports results of completed compass calibration. Sent until MAG_CAL_ACK received."]
17904#[derive(Debug, Clone, PartialEq)]
17905#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
17906#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
17907pub struct MAG_CAL_REPORT_DATA {
17908    #[doc = "RMS milligauss residuals."]
17909    pub fitness: f32,
17910    #[doc = "X offset."]
17911    pub ofs_x: f32,
17912    #[doc = "Y offset."]
17913    pub ofs_y: f32,
17914    #[doc = "Z offset."]
17915    pub ofs_z: f32,
17916    #[doc = "X diagonal (matrix 11)."]
17917    pub diag_x: f32,
17918    #[doc = "Y diagonal (matrix 22)."]
17919    pub diag_y: f32,
17920    #[doc = "Z diagonal (matrix 33)."]
17921    pub diag_z: f32,
17922    #[doc = "X off-diagonal (matrix 12 and 21)."]
17923    pub offdiag_x: f32,
17924    #[doc = "Y off-diagonal (matrix 13 and 31)."]
17925    pub offdiag_y: f32,
17926    #[doc = "Z off-diagonal (matrix 32 and 23)."]
17927    pub offdiag_z: f32,
17928    #[doc = "Compass being calibrated."]
17929    pub compass_id: u8,
17930    #[doc = "Bitmask of compasses being calibrated."]
17931    pub cal_mask: u8,
17932    #[doc = "Calibration Status."]
17933    pub cal_status: MagCalStatus,
17934    #[doc = "0=requires a MAV_CMD_DO_ACCEPT_MAG_CAL, 1=saved to parameters."]
17935    pub autosaved: u8,
17936    #[doc = "Confidence in orientation (higher is better)."]
17937    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17938    pub orientation_confidence: f32,
17939    #[doc = "orientation before calibration."]
17940    #[cfg_attr(feature = "serde", serde(default))]
17941    pub old_orientation: MavSensorOrientation,
17942    #[doc = "orientation after calibration."]
17943    #[cfg_attr(feature = "serde", serde(default))]
17944    pub new_orientation: MavSensorOrientation,
17945    #[doc = "field radius correction factor"]
17946    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
17947    pub scale_factor: f32,
17948}
17949impl MAG_CAL_REPORT_DATA {
17950    pub const ENCODED_LEN: usize = 54usize;
17951    pub const DEFAULT: Self = Self {
17952        fitness: 0.0_f32,
17953        ofs_x: 0.0_f32,
17954        ofs_y: 0.0_f32,
17955        ofs_z: 0.0_f32,
17956        diag_x: 0.0_f32,
17957        diag_y: 0.0_f32,
17958        diag_z: 0.0_f32,
17959        offdiag_x: 0.0_f32,
17960        offdiag_y: 0.0_f32,
17961        offdiag_z: 0.0_f32,
17962        compass_id: 0_u8,
17963        cal_mask: 0_u8,
17964        cal_status: MagCalStatus::DEFAULT,
17965        autosaved: 0_u8,
17966        orientation_confidence: 0.0_f32,
17967        old_orientation: MavSensorOrientation::DEFAULT,
17968        new_orientation: MavSensorOrientation::DEFAULT,
17969        scale_factor: 0.0_f32,
17970    };
17971    #[cfg(feature = "arbitrary")]
17972    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
17973        use arbitrary::{Arbitrary, Unstructured};
17974        let mut buf = [0u8; 1024];
17975        rng.fill_bytes(&mut buf);
17976        let mut unstructured = Unstructured::new(&buf);
17977        Self::arbitrary(&mut unstructured).unwrap_or_default()
17978    }
17979}
17980impl Default for MAG_CAL_REPORT_DATA {
17981    fn default() -> Self {
17982        Self::DEFAULT.clone()
17983    }
17984}
17985impl MessageData for MAG_CAL_REPORT_DATA {
17986    type Message = MavMessage;
17987    const ID: u32 = 192u32;
17988    const NAME: &'static str = "MAG_CAL_REPORT";
17989    const EXTRA_CRC: u8 = 36u8;
17990    const ENCODED_LEN: usize = 54usize;
17991    fn deser(
17992        _version: MavlinkVersion,
17993        __input: &[u8],
17994    ) -> Result<Self, ::mavlink_core::error::ParserError> {
17995        let avail_len = __input.len();
17996        let mut payload_buf = [0; Self::ENCODED_LEN];
17997        let mut buf = if avail_len < Self::ENCODED_LEN {
17998            payload_buf[0..avail_len].copy_from_slice(__input);
17999            Bytes::new(&payload_buf)
18000        } else {
18001            Bytes::new(__input)
18002        };
18003        let mut __struct = Self::default();
18004        __struct.fitness = buf.get_f32_le();
18005        __struct.ofs_x = buf.get_f32_le();
18006        __struct.ofs_y = buf.get_f32_le();
18007        __struct.ofs_z = buf.get_f32_le();
18008        __struct.diag_x = buf.get_f32_le();
18009        __struct.diag_y = buf.get_f32_le();
18010        __struct.diag_z = buf.get_f32_le();
18011        __struct.offdiag_x = buf.get_f32_le();
18012        __struct.offdiag_y = buf.get_f32_le();
18013        __struct.offdiag_z = buf.get_f32_le();
18014        __struct.compass_id = buf.get_u8();
18015        __struct.cal_mask = buf.get_u8();
18016        let tmp = buf.get_u8();
18017        __struct.cal_status =
18018            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18019                enum_type: "MagCalStatus",
18020                value: tmp as u32,
18021            })?;
18022        __struct.autosaved = buf.get_u8();
18023        __struct.orientation_confidence = buf.get_f32_le();
18024        let tmp = buf.get_u8();
18025        __struct.old_orientation =
18026            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18027                enum_type: "MavSensorOrientation",
18028                value: tmp as u32,
18029            })?;
18030        let tmp = buf.get_u8();
18031        __struct.new_orientation =
18032            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18033                enum_type: "MavSensorOrientation",
18034                value: tmp as u32,
18035            })?;
18036        __struct.scale_factor = buf.get_f32_le();
18037        Ok(__struct)
18038    }
18039    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18040        let mut __tmp = BytesMut::new(bytes);
18041        #[allow(clippy::absurd_extreme_comparisons)]
18042        #[allow(unused_comparisons)]
18043        if __tmp.remaining() < Self::ENCODED_LEN {
18044            panic!(
18045                "buffer is too small (need {} bytes, but got {})",
18046                Self::ENCODED_LEN,
18047                __tmp.remaining(),
18048            )
18049        }
18050        __tmp.put_f32_le(self.fitness);
18051        __tmp.put_f32_le(self.ofs_x);
18052        __tmp.put_f32_le(self.ofs_y);
18053        __tmp.put_f32_le(self.ofs_z);
18054        __tmp.put_f32_le(self.diag_x);
18055        __tmp.put_f32_le(self.diag_y);
18056        __tmp.put_f32_le(self.diag_z);
18057        __tmp.put_f32_le(self.offdiag_x);
18058        __tmp.put_f32_le(self.offdiag_y);
18059        __tmp.put_f32_le(self.offdiag_z);
18060        __tmp.put_u8(self.compass_id);
18061        __tmp.put_u8(self.cal_mask);
18062        __tmp.put_u8(self.cal_status as u8);
18063        __tmp.put_u8(self.autosaved);
18064        __tmp.put_f32_le(self.orientation_confidence);
18065        __tmp.put_u8(self.old_orientation as u8);
18066        __tmp.put_u8(self.new_orientation as u8);
18067        __tmp.put_f32_le(self.scale_factor);
18068        if matches!(version, MavlinkVersion::V2) {
18069            let len = __tmp.len();
18070            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18071        } else {
18072            __tmp.len()
18073        }
18074    }
18075}
18076#[doc = "id: 69"]
18077#[doc = "This message provides an API for manually controlling the vehicle using standard joystick axes nomenclature, along with a joystick-like input device. Unused axes can be disabled and buttons states are transmitted as individual on/off bits of a bitmask."]
18078#[derive(Debug, Clone, PartialEq)]
18079#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18080#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18081pub struct MANUAL_CONTROL_DATA {
18082    #[doc = "X-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to forward(1000)-backward(-1000) movement on a joystick and the pitch of a vehicle."]
18083    pub x: i16,
18084    #[doc = "Y-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to left(-1000)-right(1000) movement on a joystick and the roll of a vehicle."]
18085    pub y: i16,
18086    #[doc = "Z-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a separate slider movement with maximum being 1000 and minimum being -1000 on a joystick and the thrust of a vehicle. Positive values are positive thrust, negative values are negative thrust."]
18087    pub z: i16,
18088    #[doc = "R-axis, normalized to the range [-1000,1000]. A value of INT16_MAX indicates that this axis is invalid. Generally corresponds to a twisting of the joystick, with counter-clockwise being 1000 and clockwise being -1000, and the yaw of a vehicle."]
18089    pub r: i16,
18090    #[doc = "A bitfield corresponding to the joystick buttons' 0-15 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 1."]
18091    pub buttons: u16,
18092    #[doc = "The system to be controlled."]
18093    pub target: u8,
18094    #[doc = "A bitfield corresponding to the joystick buttons' 16-31 current state, 1 for pressed, 0 for released. The lowest bit corresponds to Button 16."]
18095    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18096    pub buttons2: u16,
18097    #[doc = "Set bits to 1 to indicate which of the following extension fields contain valid data: bit 0: pitch, bit 1: roll, bit 2: aux1, bit 3: aux2, bit 4: aux3, bit 5: aux4, bit 6: aux5, bit 7: aux6"]
18098    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18099    pub enabled_extensions: u8,
18100    #[doc = "Pitch-only-axis, normalized to the range [-1000,1000]. Generally corresponds to pitch on vehicles with additional degrees of freedom. Valid if bit 0 of enabled_extensions field is set. Set to 0 if invalid."]
18101    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18102    pub s: i16,
18103    #[doc = "Roll-only-axis, normalized to the range [-1000,1000]. Generally corresponds to roll on vehicles with additional degrees of freedom. Valid if bit 1 of enabled_extensions field is set. Set to 0 if invalid."]
18104    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18105    pub t: i16,
18106    #[doc = "Aux continuous input field 1. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 2 of enabled_extensions field is set. 0 if bit 2 is unset."]
18107    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18108    pub aux1: i16,
18109    #[doc = "Aux continuous input field 2. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 3 of enabled_extensions field is set. 0 if bit 3 is unset."]
18110    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18111    pub aux2: i16,
18112    #[doc = "Aux continuous input field 3. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 4 of enabled_extensions field is set. 0 if bit 4 is unset."]
18113    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18114    pub aux3: i16,
18115    #[doc = "Aux continuous input field 4. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 5 of enabled_extensions field is set. 0 if bit 5 is unset."]
18116    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18117    pub aux4: i16,
18118    #[doc = "Aux continuous input field 5. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 6 of enabled_extensions field is set. 0 if bit 6 is unset."]
18119    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18120    pub aux5: i16,
18121    #[doc = "Aux continuous input field 6. Normalized in the range [-1000,1000]. Purpose defined by recipient. Valid data if bit 7 of enabled_extensions field is set. 0 if bit 7 is unset."]
18122    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18123    pub aux6: i16,
18124}
18125impl MANUAL_CONTROL_DATA {
18126    pub const ENCODED_LEN: usize = 30usize;
18127    pub const DEFAULT: Self = Self {
18128        x: 0_i16,
18129        y: 0_i16,
18130        z: 0_i16,
18131        r: 0_i16,
18132        buttons: 0_u16,
18133        target: 0_u8,
18134        buttons2: 0_u16,
18135        enabled_extensions: 0_u8,
18136        s: 0_i16,
18137        t: 0_i16,
18138        aux1: 0_i16,
18139        aux2: 0_i16,
18140        aux3: 0_i16,
18141        aux4: 0_i16,
18142        aux5: 0_i16,
18143        aux6: 0_i16,
18144    };
18145    #[cfg(feature = "arbitrary")]
18146    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18147        use arbitrary::{Arbitrary, Unstructured};
18148        let mut buf = [0u8; 1024];
18149        rng.fill_bytes(&mut buf);
18150        let mut unstructured = Unstructured::new(&buf);
18151        Self::arbitrary(&mut unstructured).unwrap_or_default()
18152    }
18153}
18154impl Default for MANUAL_CONTROL_DATA {
18155    fn default() -> Self {
18156        Self::DEFAULT.clone()
18157    }
18158}
18159impl MessageData for MANUAL_CONTROL_DATA {
18160    type Message = MavMessage;
18161    const ID: u32 = 69u32;
18162    const NAME: &'static str = "MANUAL_CONTROL";
18163    const EXTRA_CRC: u8 = 243u8;
18164    const ENCODED_LEN: usize = 30usize;
18165    fn deser(
18166        _version: MavlinkVersion,
18167        __input: &[u8],
18168    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18169        let avail_len = __input.len();
18170        let mut payload_buf = [0; Self::ENCODED_LEN];
18171        let mut buf = if avail_len < Self::ENCODED_LEN {
18172            payload_buf[0..avail_len].copy_from_slice(__input);
18173            Bytes::new(&payload_buf)
18174        } else {
18175            Bytes::new(__input)
18176        };
18177        let mut __struct = Self::default();
18178        __struct.x = buf.get_i16_le();
18179        __struct.y = buf.get_i16_le();
18180        __struct.z = buf.get_i16_le();
18181        __struct.r = buf.get_i16_le();
18182        __struct.buttons = buf.get_u16_le();
18183        __struct.target = buf.get_u8();
18184        __struct.buttons2 = buf.get_u16_le();
18185        __struct.enabled_extensions = buf.get_u8();
18186        __struct.s = buf.get_i16_le();
18187        __struct.t = buf.get_i16_le();
18188        __struct.aux1 = buf.get_i16_le();
18189        __struct.aux2 = buf.get_i16_le();
18190        __struct.aux3 = buf.get_i16_le();
18191        __struct.aux4 = buf.get_i16_le();
18192        __struct.aux5 = buf.get_i16_le();
18193        __struct.aux6 = buf.get_i16_le();
18194        Ok(__struct)
18195    }
18196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18197        let mut __tmp = BytesMut::new(bytes);
18198        #[allow(clippy::absurd_extreme_comparisons)]
18199        #[allow(unused_comparisons)]
18200        if __tmp.remaining() < Self::ENCODED_LEN {
18201            panic!(
18202                "buffer is too small (need {} bytes, but got {})",
18203                Self::ENCODED_LEN,
18204                __tmp.remaining(),
18205            )
18206        }
18207        __tmp.put_i16_le(self.x);
18208        __tmp.put_i16_le(self.y);
18209        __tmp.put_i16_le(self.z);
18210        __tmp.put_i16_le(self.r);
18211        __tmp.put_u16_le(self.buttons);
18212        __tmp.put_u8(self.target);
18213        __tmp.put_u16_le(self.buttons2);
18214        __tmp.put_u8(self.enabled_extensions);
18215        __tmp.put_i16_le(self.s);
18216        __tmp.put_i16_le(self.t);
18217        __tmp.put_i16_le(self.aux1);
18218        __tmp.put_i16_le(self.aux2);
18219        __tmp.put_i16_le(self.aux3);
18220        __tmp.put_i16_le(self.aux4);
18221        __tmp.put_i16_le(self.aux5);
18222        __tmp.put_i16_le(self.aux6);
18223        if matches!(version, MavlinkVersion::V2) {
18224            let len = __tmp.len();
18225            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18226        } else {
18227            __tmp.len()
18228        }
18229    }
18230}
18231#[doc = "id: 81"]
18232#[doc = "Setpoint in roll, pitch, yaw and thrust from the operator."]
18233#[derive(Debug, Clone, PartialEq)]
18234#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18235#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18236pub struct MANUAL_SETPOINT_DATA {
18237    #[doc = "Timestamp (time since system boot)."]
18238    pub time_boot_ms: u32,
18239    #[doc = "Desired roll rate"]
18240    pub roll: f32,
18241    #[doc = "Desired pitch rate"]
18242    pub pitch: f32,
18243    #[doc = "Desired yaw rate"]
18244    pub yaw: f32,
18245    #[doc = "Collective thrust, normalized to 0 .. 1"]
18246    pub thrust: f32,
18247    #[doc = "Flight mode switch position, 0.. 255"]
18248    pub mode_switch: u8,
18249    #[doc = "Override mode switch position, 0.. 255"]
18250    pub manual_override_switch: u8,
18251}
18252impl MANUAL_SETPOINT_DATA {
18253    pub const ENCODED_LEN: usize = 22usize;
18254    pub const DEFAULT: Self = Self {
18255        time_boot_ms: 0_u32,
18256        roll: 0.0_f32,
18257        pitch: 0.0_f32,
18258        yaw: 0.0_f32,
18259        thrust: 0.0_f32,
18260        mode_switch: 0_u8,
18261        manual_override_switch: 0_u8,
18262    };
18263    #[cfg(feature = "arbitrary")]
18264    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18265        use arbitrary::{Arbitrary, Unstructured};
18266        let mut buf = [0u8; 1024];
18267        rng.fill_bytes(&mut buf);
18268        let mut unstructured = Unstructured::new(&buf);
18269        Self::arbitrary(&mut unstructured).unwrap_or_default()
18270    }
18271}
18272impl Default for MANUAL_SETPOINT_DATA {
18273    fn default() -> Self {
18274        Self::DEFAULT.clone()
18275    }
18276}
18277impl MessageData for MANUAL_SETPOINT_DATA {
18278    type Message = MavMessage;
18279    const ID: u32 = 81u32;
18280    const NAME: &'static str = "MANUAL_SETPOINT";
18281    const EXTRA_CRC: u8 = 106u8;
18282    const ENCODED_LEN: usize = 22usize;
18283    fn deser(
18284        _version: MavlinkVersion,
18285        __input: &[u8],
18286    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18287        let avail_len = __input.len();
18288        let mut payload_buf = [0; Self::ENCODED_LEN];
18289        let mut buf = if avail_len < Self::ENCODED_LEN {
18290            payload_buf[0..avail_len].copy_from_slice(__input);
18291            Bytes::new(&payload_buf)
18292        } else {
18293            Bytes::new(__input)
18294        };
18295        let mut __struct = Self::default();
18296        __struct.time_boot_ms = buf.get_u32_le();
18297        __struct.roll = buf.get_f32_le();
18298        __struct.pitch = buf.get_f32_le();
18299        __struct.yaw = buf.get_f32_le();
18300        __struct.thrust = buf.get_f32_le();
18301        __struct.mode_switch = buf.get_u8();
18302        __struct.manual_override_switch = buf.get_u8();
18303        Ok(__struct)
18304    }
18305    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18306        let mut __tmp = BytesMut::new(bytes);
18307        #[allow(clippy::absurd_extreme_comparisons)]
18308        #[allow(unused_comparisons)]
18309        if __tmp.remaining() < Self::ENCODED_LEN {
18310            panic!(
18311                "buffer is too small (need {} bytes, but got {})",
18312                Self::ENCODED_LEN,
18313                __tmp.remaining(),
18314            )
18315        }
18316        __tmp.put_u32_le(self.time_boot_ms);
18317        __tmp.put_f32_le(self.roll);
18318        __tmp.put_f32_le(self.pitch);
18319        __tmp.put_f32_le(self.yaw);
18320        __tmp.put_f32_le(self.thrust);
18321        __tmp.put_u8(self.mode_switch);
18322        __tmp.put_u8(self.manual_override_switch);
18323        if matches!(version, MavlinkVersion::V2) {
18324            let len = __tmp.len();
18325            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18326        } else {
18327            __tmp.len()
18328        }
18329    }
18330}
18331#[doc = "id: 249"]
18332#[doc = "Send raw controller memory. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
18333#[derive(Debug, Clone, PartialEq)]
18334#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18335#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18336pub struct MEMORY_VECT_DATA {
18337    #[doc = "Starting address of the debug variables"]
18338    pub address: u16,
18339    #[doc = "Version code of the type variable. 0=unknown, type ignored and assumed int16_t. 1=as below"]
18340    pub ver: u8,
18341    #[doc = "Type code of the memory variables. for ver = 1: 0=16 x int16_t, 1=16 x uint16_t, 2=16 x Q15, 3=16 x 1Q14"]
18342    pub mavtype: u8,
18343    #[doc = "Memory contents at specified address"]
18344    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
18345    pub value: [i8; 32],
18346}
18347impl MEMORY_VECT_DATA {
18348    pub const ENCODED_LEN: usize = 36usize;
18349    pub const DEFAULT: Self = Self {
18350        address: 0_u16,
18351        ver: 0_u8,
18352        mavtype: 0_u8,
18353        value: [0_i8; 32usize],
18354    };
18355    #[cfg(feature = "arbitrary")]
18356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18357        use arbitrary::{Arbitrary, Unstructured};
18358        let mut buf = [0u8; 1024];
18359        rng.fill_bytes(&mut buf);
18360        let mut unstructured = Unstructured::new(&buf);
18361        Self::arbitrary(&mut unstructured).unwrap_or_default()
18362    }
18363}
18364impl Default for MEMORY_VECT_DATA {
18365    fn default() -> Self {
18366        Self::DEFAULT.clone()
18367    }
18368}
18369impl MessageData for MEMORY_VECT_DATA {
18370    type Message = MavMessage;
18371    const ID: u32 = 249u32;
18372    const NAME: &'static str = "MEMORY_VECT";
18373    const EXTRA_CRC: u8 = 204u8;
18374    const ENCODED_LEN: usize = 36usize;
18375    fn deser(
18376        _version: MavlinkVersion,
18377        __input: &[u8],
18378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18379        let avail_len = __input.len();
18380        let mut payload_buf = [0; Self::ENCODED_LEN];
18381        let mut buf = if avail_len < Self::ENCODED_LEN {
18382            payload_buf[0..avail_len].copy_from_slice(__input);
18383            Bytes::new(&payload_buf)
18384        } else {
18385            Bytes::new(__input)
18386        };
18387        let mut __struct = Self::default();
18388        __struct.address = buf.get_u16_le();
18389        __struct.ver = buf.get_u8();
18390        __struct.mavtype = buf.get_u8();
18391        for v in &mut __struct.value {
18392            let val = buf.get_i8();
18393            *v = val;
18394        }
18395        Ok(__struct)
18396    }
18397    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18398        let mut __tmp = BytesMut::new(bytes);
18399        #[allow(clippy::absurd_extreme_comparisons)]
18400        #[allow(unused_comparisons)]
18401        if __tmp.remaining() < Self::ENCODED_LEN {
18402            panic!(
18403                "buffer is too small (need {} bytes, but got {})",
18404                Self::ENCODED_LEN,
18405                __tmp.remaining(),
18406            )
18407        }
18408        __tmp.put_u16_le(self.address);
18409        __tmp.put_u8(self.ver);
18410        __tmp.put_u8(self.mavtype);
18411        for val in &self.value {
18412            __tmp.put_i8(*val);
18413        }
18414        if matches!(version, MavlinkVersion::V2) {
18415            let len = __tmp.len();
18416            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18417        } else {
18418            __tmp.len()
18419        }
18420    }
18421}
18422#[doc = "id: 244"]
18423#[doc = "The interval between messages for a particular MAVLink message ID.         This message is sent in response to the MAV_CMD_REQUEST_MESSAGE command with param1=244 (this message) and param2=message_id (the id of the message for which the interval is required). \tIt may also be sent in response to MAV_CMD_GET_MESSAGE_INTERVAL. \tThis interface replaces DATA_STREAM."]
18424#[derive(Debug, Clone, PartialEq)]
18425#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18426#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18427pub struct MESSAGE_INTERVAL_DATA {
18428    #[doc = "0 indicates the interval at which it is sent."]
18429    pub interval_us: i32,
18430    #[doc = "The ID of the requested MAVLink message. v1.0 is limited to 254 messages."]
18431    pub message_id: u16,
18432}
18433impl MESSAGE_INTERVAL_DATA {
18434    pub const ENCODED_LEN: usize = 6usize;
18435    pub const DEFAULT: Self = Self {
18436        interval_us: 0_i32,
18437        message_id: 0_u16,
18438    };
18439    #[cfg(feature = "arbitrary")]
18440    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18441        use arbitrary::{Arbitrary, Unstructured};
18442        let mut buf = [0u8; 1024];
18443        rng.fill_bytes(&mut buf);
18444        let mut unstructured = Unstructured::new(&buf);
18445        Self::arbitrary(&mut unstructured).unwrap_or_default()
18446    }
18447}
18448impl Default for MESSAGE_INTERVAL_DATA {
18449    fn default() -> Self {
18450        Self::DEFAULT.clone()
18451    }
18452}
18453impl MessageData for MESSAGE_INTERVAL_DATA {
18454    type Message = MavMessage;
18455    const ID: u32 = 244u32;
18456    const NAME: &'static str = "MESSAGE_INTERVAL";
18457    const EXTRA_CRC: u8 = 95u8;
18458    const ENCODED_LEN: usize = 6usize;
18459    fn deser(
18460        _version: MavlinkVersion,
18461        __input: &[u8],
18462    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18463        let avail_len = __input.len();
18464        let mut payload_buf = [0; Self::ENCODED_LEN];
18465        let mut buf = if avail_len < Self::ENCODED_LEN {
18466            payload_buf[0..avail_len].copy_from_slice(__input);
18467            Bytes::new(&payload_buf)
18468        } else {
18469            Bytes::new(__input)
18470        };
18471        let mut __struct = Self::default();
18472        __struct.interval_us = buf.get_i32_le();
18473        __struct.message_id = buf.get_u16_le();
18474        Ok(__struct)
18475    }
18476    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18477        let mut __tmp = BytesMut::new(bytes);
18478        #[allow(clippy::absurd_extreme_comparisons)]
18479        #[allow(unused_comparisons)]
18480        if __tmp.remaining() < Self::ENCODED_LEN {
18481            panic!(
18482                "buffer is too small (need {} bytes, but got {})",
18483                Self::ENCODED_LEN,
18484                __tmp.remaining(),
18485            )
18486        }
18487        __tmp.put_i32_le(self.interval_us);
18488        __tmp.put_u16_le(self.message_id);
18489        if matches!(version, MavlinkVersion::V2) {
18490            let len = __tmp.len();
18491            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18492        } else {
18493            __tmp.len()
18494        }
18495    }
18496}
18497#[doc = "id: 47"]
18498#[doc = "Acknowledgment message during waypoint handling. The type field states if this message is a positive ack (type=0) or if an error happened (type=non-zero)."]
18499#[derive(Debug, Clone, PartialEq)]
18500#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18501#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18502pub struct MISSION_ACK_DATA {
18503    #[doc = "System ID"]
18504    pub target_system: u8,
18505    #[doc = "Component ID"]
18506    pub target_component: u8,
18507    #[doc = "Mission result."]
18508    pub mavtype: MavMissionResult,
18509    #[doc = "Mission type."]
18510    #[cfg_attr(feature = "serde", serde(default))]
18511    pub mission_type: MavMissionType,
18512    #[doc = "Id of new on-vehicle mission, fence, or rally point plan (on upload to vehicle).         The id is calculated and returned by a vehicle when a new plan is uploaded by a GCS.         The only requirement on the id is that it must change when there is any change to the on-vehicle plan type (there is no requirement that the id be globally unique).         0 on download from the vehicle to the GCS (on download the ID is set in MISSION_COUNT).         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded."]
18513    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18514    pub opaque_id: u32,
18515}
18516impl MISSION_ACK_DATA {
18517    pub const ENCODED_LEN: usize = 8usize;
18518    pub const DEFAULT: Self = Self {
18519        target_system: 0_u8,
18520        target_component: 0_u8,
18521        mavtype: MavMissionResult::DEFAULT,
18522        mission_type: MavMissionType::DEFAULT,
18523        opaque_id: 0_u32,
18524    };
18525    #[cfg(feature = "arbitrary")]
18526    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18527        use arbitrary::{Arbitrary, Unstructured};
18528        let mut buf = [0u8; 1024];
18529        rng.fill_bytes(&mut buf);
18530        let mut unstructured = Unstructured::new(&buf);
18531        Self::arbitrary(&mut unstructured).unwrap_or_default()
18532    }
18533}
18534impl Default for MISSION_ACK_DATA {
18535    fn default() -> Self {
18536        Self::DEFAULT.clone()
18537    }
18538}
18539impl MessageData for MISSION_ACK_DATA {
18540    type Message = MavMessage;
18541    const ID: u32 = 47u32;
18542    const NAME: &'static str = "MISSION_ACK";
18543    const EXTRA_CRC: u8 = 153u8;
18544    const ENCODED_LEN: usize = 8usize;
18545    fn deser(
18546        _version: MavlinkVersion,
18547        __input: &[u8],
18548    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18549        let avail_len = __input.len();
18550        let mut payload_buf = [0; Self::ENCODED_LEN];
18551        let mut buf = if avail_len < Self::ENCODED_LEN {
18552            payload_buf[0..avail_len].copy_from_slice(__input);
18553            Bytes::new(&payload_buf)
18554        } else {
18555            Bytes::new(__input)
18556        };
18557        let mut __struct = Self::default();
18558        __struct.target_system = buf.get_u8();
18559        __struct.target_component = buf.get_u8();
18560        let tmp = buf.get_u8();
18561        __struct.mavtype =
18562            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18563                enum_type: "MavMissionResult",
18564                value: tmp as u32,
18565            })?;
18566        let tmp = buf.get_u8();
18567        __struct.mission_type =
18568            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18569                enum_type: "MavMissionType",
18570                value: tmp as u32,
18571            })?;
18572        __struct.opaque_id = buf.get_u32_le();
18573        Ok(__struct)
18574    }
18575    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18576        let mut __tmp = BytesMut::new(bytes);
18577        #[allow(clippy::absurd_extreme_comparisons)]
18578        #[allow(unused_comparisons)]
18579        if __tmp.remaining() < Self::ENCODED_LEN {
18580            panic!(
18581                "buffer is too small (need {} bytes, but got {})",
18582                Self::ENCODED_LEN,
18583                __tmp.remaining(),
18584            )
18585        }
18586        __tmp.put_u8(self.target_system);
18587        __tmp.put_u8(self.target_component);
18588        __tmp.put_u8(self.mavtype as u8);
18589        __tmp.put_u8(self.mission_type as u8);
18590        __tmp.put_u32_le(self.opaque_id);
18591        if matches!(version, MavlinkVersion::V2) {
18592            let len = __tmp.len();
18593            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18594        } else {
18595            __tmp.len()
18596        }
18597    }
18598}
18599#[doc = "id: 45"]
18600#[doc = "Delete all mission items at once."]
18601#[derive(Debug, Clone, PartialEq)]
18602#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18603#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18604pub struct MISSION_CLEAR_ALL_DATA {
18605    #[doc = "System ID"]
18606    pub target_system: u8,
18607    #[doc = "Component ID"]
18608    pub target_component: u8,
18609    #[doc = "Mission type."]
18610    #[cfg_attr(feature = "serde", serde(default))]
18611    pub mission_type: MavMissionType,
18612}
18613impl MISSION_CLEAR_ALL_DATA {
18614    pub const ENCODED_LEN: usize = 3usize;
18615    pub const DEFAULT: Self = Self {
18616        target_system: 0_u8,
18617        target_component: 0_u8,
18618        mission_type: MavMissionType::DEFAULT,
18619    };
18620    #[cfg(feature = "arbitrary")]
18621    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18622        use arbitrary::{Arbitrary, Unstructured};
18623        let mut buf = [0u8; 1024];
18624        rng.fill_bytes(&mut buf);
18625        let mut unstructured = Unstructured::new(&buf);
18626        Self::arbitrary(&mut unstructured).unwrap_or_default()
18627    }
18628}
18629impl Default for MISSION_CLEAR_ALL_DATA {
18630    fn default() -> Self {
18631        Self::DEFAULT.clone()
18632    }
18633}
18634impl MessageData for MISSION_CLEAR_ALL_DATA {
18635    type Message = MavMessage;
18636    const ID: u32 = 45u32;
18637    const NAME: &'static str = "MISSION_CLEAR_ALL";
18638    const EXTRA_CRC: u8 = 232u8;
18639    const ENCODED_LEN: usize = 3usize;
18640    fn deser(
18641        _version: MavlinkVersion,
18642        __input: &[u8],
18643    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18644        let avail_len = __input.len();
18645        let mut payload_buf = [0; Self::ENCODED_LEN];
18646        let mut buf = if avail_len < Self::ENCODED_LEN {
18647            payload_buf[0..avail_len].copy_from_slice(__input);
18648            Bytes::new(&payload_buf)
18649        } else {
18650            Bytes::new(__input)
18651        };
18652        let mut __struct = Self::default();
18653        __struct.target_system = buf.get_u8();
18654        __struct.target_component = buf.get_u8();
18655        let tmp = buf.get_u8();
18656        __struct.mission_type =
18657            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18658                enum_type: "MavMissionType",
18659                value: tmp as u32,
18660            })?;
18661        Ok(__struct)
18662    }
18663    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18664        let mut __tmp = BytesMut::new(bytes);
18665        #[allow(clippy::absurd_extreme_comparisons)]
18666        #[allow(unused_comparisons)]
18667        if __tmp.remaining() < Self::ENCODED_LEN {
18668            panic!(
18669                "buffer is too small (need {} bytes, but got {})",
18670                Self::ENCODED_LEN,
18671                __tmp.remaining(),
18672            )
18673        }
18674        __tmp.put_u8(self.target_system);
18675        __tmp.put_u8(self.target_component);
18676        __tmp.put_u8(self.mission_type as u8);
18677        if matches!(version, MavlinkVersion::V2) {
18678            let len = __tmp.len();
18679            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18680        } else {
18681            __tmp.len()
18682        }
18683    }
18684}
18685#[doc = "id: 44"]
18686#[doc = "This message is emitted as response to MISSION_REQUEST_LIST by the MAV and to initiate a write transaction. The GCS can then request the individual mission item based on the knowledge of the total number of waypoints."]
18687#[derive(Debug, Clone, PartialEq)]
18688#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18689#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18690pub struct MISSION_COUNT_DATA {
18691    #[doc = "Number of mission items in the sequence"]
18692    pub count: u16,
18693    #[doc = "System ID"]
18694    pub target_system: u8,
18695    #[doc = "Component ID"]
18696    pub target_component: u8,
18697    #[doc = "Mission type."]
18698    #[cfg_attr(feature = "serde", serde(default))]
18699    pub mission_type: MavMissionType,
18700    #[doc = "Id of current on-vehicle mission, fence, or rally point plan (on download from vehicle).         This field is used when downloading a plan from a vehicle to a GCS.         0 on upload to the vehicle from GCS.         0 if plan ids are not supported.         The current on-vehicle plan ids are streamed in `MISSION_CURRENT`, allowing a GCS to determine if any part of the plan has changed and needs to be re-uploaded.         The ids are recalculated by the vehicle when any part of the on-vehicle plan changes (when a new plan is uploaded, the vehicle returns the new id to the GCS in MISSION_ACK)."]
18701    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18702    pub opaque_id: u32,
18703}
18704impl MISSION_COUNT_DATA {
18705    pub const ENCODED_LEN: usize = 9usize;
18706    pub const DEFAULT: Self = Self {
18707        count: 0_u16,
18708        target_system: 0_u8,
18709        target_component: 0_u8,
18710        mission_type: MavMissionType::DEFAULT,
18711        opaque_id: 0_u32,
18712    };
18713    #[cfg(feature = "arbitrary")]
18714    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18715        use arbitrary::{Arbitrary, Unstructured};
18716        let mut buf = [0u8; 1024];
18717        rng.fill_bytes(&mut buf);
18718        let mut unstructured = Unstructured::new(&buf);
18719        Self::arbitrary(&mut unstructured).unwrap_or_default()
18720    }
18721}
18722impl Default for MISSION_COUNT_DATA {
18723    fn default() -> Self {
18724        Self::DEFAULT.clone()
18725    }
18726}
18727impl MessageData for MISSION_COUNT_DATA {
18728    type Message = MavMessage;
18729    const ID: u32 = 44u32;
18730    const NAME: &'static str = "MISSION_COUNT";
18731    const EXTRA_CRC: u8 = 221u8;
18732    const ENCODED_LEN: usize = 9usize;
18733    fn deser(
18734        _version: MavlinkVersion,
18735        __input: &[u8],
18736    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18737        let avail_len = __input.len();
18738        let mut payload_buf = [0; Self::ENCODED_LEN];
18739        let mut buf = if avail_len < Self::ENCODED_LEN {
18740            payload_buf[0..avail_len].copy_from_slice(__input);
18741            Bytes::new(&payload_buf)
18742        } else {
18743            Bytes::new(__input)
18744        };
18745        let mut __struct = Self::default();
18746        __struct.count = buf.get_u16_le();
18747        __struct.target_system = buf.get_u8();
18748        __struct.target_component = buf.get_u8();
18749        let tmp = buf.get_u8();
18750        __struct.mission_type =
18751            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18752                enum_type: "MavMissionType",
18753                value: tmp as u32,
18754            })?;
18755        __struct.opaque_id = buf.get_u32_le();
18756        Ok(__struct)
18757    }
18758    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18759        let mut __tmp = BytesMut::new(bytes);
18760        #[allow(clippy::absurd_extreme_comparisons)]
18761        #[allow(unused_comparisons)]
18762        if __tmp.remaining() < Self::ENCODED_LEN {
18763            panic!(
18764                "buffer is too small (need {} bytes, but got {})",
18765                Self::ENCODED_LEN,
18766                __tmp.remaining(),
18767            )
18768        }
18769        __tmp.put_u16_le(self.count);
18770        __tmp.put_u8(self.target_system);
18771        __tmp.put_u8(self.target_component);
18772        __tmp.put_u8(self.mission_type as u8);
18773        __tmp.put_u32_le(self.opaque_id);
18774        if matches!(version, MavlinkVersion::V2) {
18775            let len = __tmp.len();
18776            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18777        } else {
18778            __tmp.len()
18779        }
18780    }
18781}
18782#[doc = "id: 42"]
18783#[doc = "Message that announces the sequence number of the current target mission item (that the system will fly towards/execute when the mission is running).         This message should be streamed all the time (nominally at 1Hz).         This message should be emitted following a call to MAV_CMD_DO_SET_MISSION_CURRENT or MISSION_SET_CURRENT."]
18784#[derive(Debug, Clone, PartialEq)]
18785#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18786#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18787pub struct MISSION_CURRENT_DATA {
18788    #[doc = "Sequence"]
18789    pub seq: u16,
18790    #[doc = "Total number of mission items on vehicle (on last item, sequence == total). If the autopilot stores its home location as part of the mission this will be excluded from the total. 0: Not supported, UINT16_MAX if no mission is present on the vehicle."]
18791    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18792    pub total: u16,
18793    #[doc = "Mission state machine state. MISSION_STATE_UNKNOWN if state reporting not supported."]
18794    #[cfg_attr(feature = "serde", serde(default))]
18795    pub mission_state: MissionState,
18796    #[doc = "Vehicle is in a mode that can execute mission items or suspended. 0: Unknown, 1: In mission mode, 2: Suspended (not in mission mode)."]
18797    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18798    pub mission_mode: u8,
18799    #[doc = "Id of current on-vehicle mission plan, or 0 if IDs are not supported or there is no mission loaded. GCS can use this to track changes to the mission plan type. The same value is returned on mission upload (in the MISSION_ACK)."]
18800    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18801    pub mission_id: u32,
18802    #[doc = "Id of current on-vehicle fence plan, or 0 if IDs are not supported or there is no fence loaded. GCS can use this to track changes to the fence plan type. The same value is returned on fence upload (in the MISSION_ACK)."]
18803    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18804    pub fence_id: u32,
18805    #[doc = "Id of current on-vehicle rally point plan, or 0 if IDs are not supported or there are no rally points loaded. GCS can use this to track changes to the rally point plan type. The same value is returned on rally point upload (in the MISSION_ACK)."]
18806    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
18807    pub rally_points_id: u32,
18808}
18809impl MISSION_CURRENT_DATA {
18810    pub const ENCODED_LEN: usize = 18usize;
18811    pub const DEFAULT: Self = Self {
18812        seq: 0_u16,
18813        total: 0_u16,
18814        mission_state: MissionState::DEFAULT,
18815        mission_mode: 0_u8,
18816        mission_id: 0_u32,
18817        fence_id: 0_u32,
18818        rally_points_id: 0_u32,
18819    };
18820    #[cfg(feature = "arbitrary")]
18821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18822        use arbitrary::{Arbitrary, Unstructured};
18823        let mut buf = [0u8; 1024];
18824        rng.fill_bytes(&mut buf);
18825        let mut unstructured = Unstructured::new(&buf);
18826        Self::arbitrary(&mut unstructured).unwrap_or_default()
18827    }
18828}
18829impl Default for MISSION_CURRENT_DATA {
18830    fn default() -> Self {
18831        Self::DEFAULT.clone()
18832    }
18833}
18834impl MessageData for MISSION_CURRENT_DATA {
18835    type Message = MavMessage;
18836    const ID: u32 = 42u32;
18837    const NAME: &'static str = "MISSION_CURRENT";
18838    const EXTRA_CRC: u8 = 28u8;
18839    const ENCODED_LEN: usize = 18usize;
18840    fn deser(
18841        _version: MavlinkVersion,
18842        __input: &[u8],
18843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18844        let avail_len = __input.len();
18845        let mut payload_buf = [0; Self::ENCODED_LEN];
18846        let mut buf = if avail_len < Self::ENCODED_LEN {
18847            payload_buf[0..avail_len].copy_from_slice(__input);
18848            Bytes::new(&payload_buf)
18849        } else {
18850            Bytes::new(__input)
18851        };
18852        let mut __struct = Self::default();
18853        __struct.seq = buf.get_u16_le();
18854        __struct.total = buf.get_u16_le();
18855        let tmp = buf.get_u8();
18856        __struct.mission_state =
18857            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
18858                enum_type: "MissionState",
18859                value: tmp as u32,
18860            })?;
18861        __struct.mission_mode = buf.get_u8();
18862        __struct.mission_id = buf.get_u32_le();
18863        __struct.fence_id = buf.get_u32_le();
18864        __struct.rally_points_id = buf.get_u32_le();
18865        Ok(__struct)
18866    }
18867    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
18868        let mut __tmp = BytesMut::new(bytes);
18869        #[allow(clippy::absurd_extreme_comparisons)]
18870        #[allow(unused_comparisons)]
18871        if __tmp.remaining() < Self::ENCODED_LEN {
18872            panic!(
18873                "buffer is too small (need {} bytes, but got {})",
18874                Self::ENCODED_LEN,
18875                __tmp.remaining(),
18876            )
18877        }
18878        __tmp.put_u16_le(self.seq);
18879        __tmp.put_u16_le(self.total);
18880        __tmp.put_u8(self.mission_state as u8);
18881        __tmp.put_u8(self.mission_mode);
18882        __tmp.put_u32_le(self.mission_id);
18883        __tmp.put_u32_le(self.fence_id);
18884        __tmp.put_u32_le(self.rally_points_id);
18885        if matches!(version, MavlinkVersion::V2) {
18886            let len = __tmp.len();
18887            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
18888        } else {
18889            __tmp.len()
18890        }
18891    }
18892}
18893#[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
18894#[doc = "id: 39"]
18895#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN may be used to indicate an optional/default value (e.g. to use the system's current latitude or yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
18896#[derive(Debug, Clone, PartialEq)]
18897#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
18898#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
18899pub struct MISSION_ITEM_DATA {
18900    #[doc = "PARAM1, see MAV_CMD enum"]
18901    pub param1: f32,
18902    #[doc = "PARAM2, see MAV_CMD enum"]
18903    pub param2: f32,
18904    #[doc = "PARAM3, see MAV_CMD enum"]
18905    pub param3: f32,
18906    #[doc = "PARAM4, see MAV_CMD enum"]
18907    pub param4: f32,
18908    #[doc = "PARAM5 / local: X coordinate, global: latitude"]
18909    pub x: f32,
18910    #[doc = "PARAM6 / local: Y coordinate, global: longitude"]
18911    pub y: f32,
18912    #[doc = "PARAM7 / local: Z coordinate, global: altitude (relative or absolute, depending on frame)."]
18913    pub z: f32,
18914    #[doc = "Sequence"]
18915    pub seq: u16,
18916    #[doc = "The scheduled action for the waypoint."]
18917    pub command: MavCmd,
18918    #[doc = "System ID"]
18919    pub target_system: u8,
18920    #[doc = "Component ID"]
18921    pub target_component: u8,
18922    #[doc = "The coordinate system of the waypoint."]
18923    pub frame: MavFrame,
18924    #[doc = "false:0, true:1"]
18925    pub current: u8,
18926    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
18927    pub autocontinue: u8,
18928    #[doc = "Mission type."]
18929    #[cfg_attr(feature = "serde", serde(default))]
18930    pub mission_type: MavMissionType,
18931}
18932impl MISSION_ITEM_DATA {
18933    pub const ENCODED_LEN: usize = 38usize;
18934    pub const DEFAULT: Self = Self {
18935        param1: 0.0_f32,
18936        param2: 0.0_f32,
18937        param3: 0.0_f32,
18938        param4: 0.0_f32,
18939        x: 0.0_f32,
18940        y: 0.0_f32,
18941        z: 0.0_f32,
18942        seq: 0_u16,
18943        command: MavCmd::DEFAULT,
18944        target_system: 0_u8,
18945        target_component: 0_u8,
18946        frame: MavFrame::DEFAULT,
18947        current: 0_u8,
18948        autocontinue: 0_u8,
18949        mission_type: MavMissionType::DEFAULT,
18950    };
18951    #[cfg(feature = "arbitrary")]
18952    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
18953        use arbitrary::{Arbitrary, Unstructured};
18954        let mut buf = [0u8; 1024];
18955        rng.fill_bytes(&mut buf);
18956        let mut unstructured = Unstructured::new(&buf);
18957        Self::arbitrary(&mut unstructured).unwrap_or_default()
18958    }
18959}
18960impl Default for MISSION_ITEM_DATA {
18961    fn default() -> Self {
18962        Self::DEFAULT.clone()
18963    }
18964}
18965impl MessageData for MISSION_ITEM_DATA {
18966    type Message = MavMessage;
18967    const ID: u32 = 39u32;
18968    const NAME: &'static str = "MISSION_ITEM";
18969    const EXTRA_CRC: u8 = 254u8;
18970    const ENCODED_LEN: usize = 38usize;
18971    fn deser(
18972        _version: MavlinkVersion,
18973        __input: &[u8],
18974    ) -> Result<Self, ::mavlink_core::error::ParserError> {
18975        let avail_len = __input.len();
18976        let mut payload_buf = [0; Self::ENCODED_LEN];
18977        let mut buf = if avail_len < Self::ENCODED_LEN {
18978            payload_buf[0..avail_len].copy_from_slice(__input);
18979            Bytes::new(&payload_buf)
18980        } else {
18981            Bytes::new(__input)
18982        };
18983        let mut __struct = Self::default();
18984        __struct.param1 = buf.get_f32_le();
18985        __struct.param2 = buf.get_f32_le();
18986        __struct.param3 = buf.get_f32_le();
18987        __struct.param4 = buf.get_f32_le();
18988        __struct.x = buf.get_f32_le();
18989        __struct.y = buf.get_f32_le();
18990        __struct.z = buf.get_f32_le();
18991        __struct.seq = buf.get_u16_le();
18992        let tmp = buf.get_u16_le();
18993        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
18994            ::mavlink_core::error::ParserError::InvalidEnum {
18995                enum_type: "MavCmd",
18996                value: tmp as u32,
18997            },
18998        )?;
18999        __struct.target_system = buf.get_u8();
19000        __struct.target_component = buf.get_u8();
19001        let tmp = buf.get_u8();
19002        __struct.frame =
19003            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19004                enum_type: "MavFrame",
19005                value: tmp as u32,
19006            })?;
19007        __struct.current = buf.get_u8();
19008        __struct.autocontinue = buf.get_u8();
19009        let tmp = buf.get_u8();
19010        __struct.mission_type =
19011            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19012                enum_type: "MavMissionType",
19013                value: tmp as u32,
19014            })?;
19015        Ok(__struct)
19016    }
19017    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19018        let mut __tmp = BytesMut::new(bytes);
19019        #[allow(clippy::absurd_extreme_comparisons)]
19020        #[allow(unused_comparisons)]
19021        if __tmp.remaining() < Self::ENCODED_LEN {
19022            panic!(
19023                "buffer is too small (need {} bytes, but got {})",
19024                Self::ENCODED_LEN,
19025                __tmp.remaining(),
19026            )
19027        }
19028        __tmp.put_f32_le(self.param1);
19029        __tmp.put_f32_le(self.param2);
19030        __tmp.put_f32_le(self.param3);
19031        __tmp.put_f32_le(self.param4);
19032        __tmp.put_f32_le(self.x);
19033        __tmp.put_f32_le(self.y);
19034        __tmp.put_f32_le(self.z);
19035        __tmp.put_u16_le(self.seq);
19036        __tmp.put_u16_le(self.command as u16);
19037        __tmp.put_u8(self.target_system);
19038        __tmp.put_u8(self.target_component);
19039        __tmp.put_u8(self.frame as u8);
19040        __tmp.put_u8(self.current);
19041        __tmp.put_u8(self.autocontinue);
19042        __tmp.put_u8(self.mission_type as u8);
19043        if matches!(version, MavlinkVersion::V2) {
19044            let len = __tmp.len();
19045            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19046        } else {
19047            __tmp.len()
19048        }
19049    }
19050}
19051#[doc = "id: 73"]
19052#[doc = "Message encoding a mission item. This message is emitted to announce                 the presence of a mission item and to set a mission item on the system. The mission item can be either in x, y, z meters (type: LOCAL) or x:lat, y:lon, z:altitude. Local frame is Z-down, right handed (NED), global frame is Z-up, right handed (ENU). NaN or INT32_MAX may be used in float/integer params (respectively) to indicate optional/default values (e.g. to use the component's current latitude, yaw rather than a specific value). See also <https://mavlink.io/en/services/mission.html>."]
19053#[derive(Debug, Clone, PartialEq)]
19054#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19055#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19056pub struct MISSION_ITEM_INT_DATA {
19057    #[doc = "PARAM1, see MAV_CMD enum"]
19058    pub param1: f32,
19059    #[doc = "PARAM2, see MAV_CMD enum"]
19060    pub param2: f32,
19061    #[doc = "PARAM3, see MAV_CMD enum"]
19062    pub param3: f32,
19063    #[doc = "PARAM4, see MAV_CMD enum"]
19064    pub param4: f32,
19065    #[doc = "PARAM5 / local: x position in meters * 1e4, global: latitude in degrees * 10^7"]
19066    pub x: i32,
19067    #[doc = "PARAM6 / y position: local: x position in meters * 1e4, global: longitude in degrees *10^7"]
19068    pub y: i32,
19069    #[doc = "PARAM7 / z position: global: altitude in meters (relative or absolute, depending on frame."]
19070    pub z: f32,
19071    #[doc = "Waypoint ID (sequence number). Starts at zero. Increases monotonically for each waypoint, no gaps in the sequence (0,1,2,3,4)."]
19072    pub seq: u16,
19073    #[doc = "The scheduled action for the waypoint."]
19074    pub command: MavCmd,
19075    #[doc = "System ID"]
19076    pub target_system: u8,
19077    #[doc = "Component ID"]
19078    pub target_component: u8,
19079    #[doc = "The coordinate system of the waypoint."]
19080    pub frame: MavFrame,
19081    #[doc = "false:0, true:1"]
19082    pub current: u8,
19083    #[doc = "Autocontinue to next waypoint. 0: false, 1: true. Set false to pause mission after the item completes."]
19084    pub autocontinue: u8,
19085    #[doc = "Mission type."]
19086    #[cfg_attr(feature = "serde", serde(default))]
19087    pub mission_type: MavMissionType,
19088}
19089impl MISSION_ITEM_INT_DATA {
19090    pub const ENCODED_LEN: usize = 38usize;
19091    pub const DEFAULT: Self = Self {
19092        param1: 0.0_f32,
19093        param2: 0.0_f32,
19094        param3: 0.0_f32,
19095        param4: 0.0_f32,
19096        x: 0_i32,
19097        y: 0_i32,
19098        z: 0.0_f32,
19099        seq: 0_u16,
19100        command: MavCmd::DEFAULT,
19101        target_system: 0_u8,
19102        target_component: 0_u8,
19103        frame: MavFrame::DEFAULT,
19104        current: 0_u8,
19105        autocontinue: 0_u8,
19106        mission_type: MavMissionType::DEFAULT,
19107    };
19108    #[cfg(feature = "arbitrary")]
19109    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19110        use arbitrary::{Arbitrary, Unstructured};
19111        let mut buf = [0u8; 1024];
19112        rng.fill_bytes(&mut buf);
19113        let mut unstructured = Unstructured::new(&buf);
19114        Self::arbitrary(&mut unstructured).unwrap_or_default()
19115    }
19116}
19117impl Default for MISSION_ITEM_INT_DATA {
19118    fn default() -> Self {
19119        Self::DEFAULT.clone()
19120    }
19121}
19122impl MessageData for MISSION_ITEM_INT_DATA {
19123    type Message = MavMessage;
19124    const ID: u32 = 73u32;
19125    const NAME: &'static str = "MISSION_ITEM_INT";
19126    const EXTRA_CRC: u8 = 38u8;
19127    const ENCODED_LEN: usize = 38usize;
19128    fn deser(
19129        _version: MavlinkVersion,
19130        __input: &[u8],
19131    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19132        let avail_len = __input.len();
19133        let mut payload_buf = [0; Self::ENCODED_LEN];
19134        let mut buf = if avail_len < Self::ENCODED_LEN {
19135            payload_buf[0..avail_len].copy_from_slice(__input);
19136            Bytes::new(&payload_buf)
19137        } else {
19138            Bytes::new(__input)
19139        };
19140        let mut __struct = Self::default();
19141        __struct.param1 = buf.get_f32_le();
19142        __struct.param2 = buf.get_f32_le();
19143        __struct.param3 = buf.get_f32_le();
19144        __struct.param4 = buf.get_f32_le();
19145        __struct.x = buf.get_i32_le();
19146        __struct.y = buf.get_i32_le();
19147        __struct.z = buf.get_f32_le();
19148        __struct.seq = buf.get_u16_le();
19149        let tmp = buf.get_u16_le();
19150        __struct.command = FromPrimitive::from_u16(tmp).ok_or(
19151            ::mavlink_core::error::ParserError::InvalidEnum {
19152                enum_type: "MavCmd",
19153                value: tmp as u32,
19154            },
19155        )?;
19156        __struct.target_system = buf.get_u8();
19157        __struct.target_component = buf.get_u8();
19158        let tmp = buf.get_u8();
19159        __struct.frame =
19160            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19161                enum_type: "MavFrame",
19162                value: tmp as u32,
19163            })?;
19164        __struct.current = buf.get_u8();
19165        __struct.autocontinue = buf.get_u8();
19166        let tmp = buf.get_u8();
19167        __struct.mission_type =
19168            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19169                enum_type: "MavMissionType",
19170                value: tmp as u32,
19171            })?;
19172        Ok(__struct)
19173    }
19174    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19175        let mut __tmp = BytesMut::new(bytes);
19176        #[allow(clippy::absurd_extreme_comparisons)]
19177        #[allow(unused_comparisons)]
19178        if __tmp.remaining() < Self::ENCODED_LEN {
19179            panic!(
19180                "buffer is too small (need {} bytes, but got {})",
19181                Self::ENCODED_LEN,
19182                __tmp.remaining(),
19183            )
19184        }
19185        __tmp.put_f32_le(self.param1);
19186        __tmp.put_f32_le(self.param2);
19187        __tmp.put_f32_le(self.param3);
19188        __tmp.put_f32_le(self.param4);
19189        __tmp.put_i32_le(self.x);
19190        __tmp.put_i32_le(self.y);
19191        __tmp.put_f32_le(self.z);
19192        __tmp.put_u16_le(self.seq);
19193        __tmp.put_u16_le(self.command as u16);
19194        __tmp.put_u8(self.target_system);
19195        __tmp.put_u8(self.target_component);
19196        __tmp.put_u8(self.frame as u8);
19197        __tmp.put_u8(self.current);
19198        __tmp.put_u8(self.autocontinue);
19199        __tmp.put_u8(self.mission_type as u8);
19200        if matches!(version, MavlinkVersion::V2) {
19201            let len = __tmp.len();
19202            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19203        } else {
19204            __tmp.len()
19205        }
19206    }
19207}
19208#[doc = "id: 46"]
19209#[doc = "A certain mission item has been reached. The system will either hold this position (or circle on the orbit) or (if the autocontinue on the WP was set) continue to the next waypoint."]
19210#[derive(Debug, Clone, PartialEq)]
19211#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19212#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19213pub struct MISSION_ITEM_REACHED_DATA {
19214    #[doc = "Sequence"]
19215    pub seq: u16,
19216}
19217impl MISSION_ITEM_REACHED_DATA {
19218    pub const ENCODED_LEN: usize = 2usize;
19219    pub const DEFAULT: Self = Self { seq: 0_u16 };
19220    #[cfg(feature = "arbitrary")]
19221    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19222        use arbitrary::{Arbitrary, Unstructured};
19223        let mut buf = [0u8; 1024];
19224        rng.fill_bytes(&mut buf);
19225        let mut unstructured = Unstructured::new(&buf);
19226        Self::arbitrary(&mut unstructured).unwrap_or_default()
19227    }
19228}
19229impl Default for MISSION_ITEM_REACHED_DATA {
19230    fn default() -> Self {
19231        Self::DEFAULT.clone()
19232    }
19233}
19234impl MessageData for MISSION_ITEM_REACHED_DATA {
19235    type Message = MavMessage;
19236    const ID: u32 = 46u32;
19237    const NAME: &'static str = "MISSION_ITEM_REACHED";
19238    const EXTRA_CRC: u8 = 11u8;
19239    const ENCODED_LEN: usize = 2usize;
19240    fn deser(
19241        _version: MavlinkVersion,
19242        __input: &[u8],
19243    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19244        let avail_len = __input.len();
19245        let mut payload_buf = [0; Self::ENCODED_LEN];
19246        let mut buf = if avail_len < Self::ENCODED_LEN {
19247            payload_buf[0..avail_len].copy_from_slice(__input);
19248            Bytes::new(&payload_buf)
19249        } else {
19250            Bytes::new(__input)
19251        };
19252        let mut __struct = Self::default();
19253        __struct.seq = buf.get_u16_le();
19254        Ok(__struct)
19255    }
19256    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19257        let mut __tmp = BytesMut::new(bytes);
19258        #[allow(clippy::absurd_extreme_comparisons)]
19259        #[allow(unused_comparisons)]
19260        if __tmp.remaining() < Self::ENCODED_LEN {
19261            panic!(
19262                "buffer is too small (need {} bytes, but got {})",
19263                Self::ENCODED_LEN,
19264                __tmp.remaining(),
19265            )
19266        }
19267        __tmp.put_u16_le(self.seq);
19268        if matches!(version, MavlinkVersion::V2) {
19269            let len = __tmp.len();
19270            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19271        } else {
19272            __tmp.len()
19273        }
19274    }
19275}
19276#[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
19277#[doc = "id: 40"]
19278#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM message. <https://mavlink.io/en/services/mission.html>."]
19279#[derive(Debug, Clone, PartialEq)]
19280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19282pub struct MISSION_REQUEST_DATA {
19283    #[doc = "Sequence"]
19284    pub seq: u16,
19285    #[doc = "System ID"]
19286    pub target_system: u8,
19287    #[doc = "Component ID"]
19288    pub target_component: u8,
19289    #[doc = "Mission type."]
19290    #[cfg_attr(feature = "serde", serde(default))]
19291    pub mission_type: MavMissionType,
19292}
19293impl MISSION_REQUEST_DATA {
19294    pub const ENCODED_LEN: usize = 5usize;
19295    pub const DEFAULT: Self = Self {
19296        seq: 0_u16,
19297        target_system: 0_u8,
19298        target_component: 0_u8,
19299        mission_type: MavMissionType::DEFAULT,
19300    };
19301    #[cfg(feature = "arbitrary")]
19302    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19303        use arbitrary::{Arbitrary, Unstructured};
19304        let mut buf = [0u8; 1024];
19305        rng.fill_bytes(&mut buf);
19306        let mut unstructured = Unstructured::new(&buf);
19307        Self::arbitrary(&mut unstructured).unwrap_or_default()
19308    }
19309}
19310impl Default for MISSION_REQUEST_DATA {
19311    fn default() -> Self {
19312        Self::DEFAULT.clone()
19313    }
19314}
19315impl MessageData for MISSION_REQUEST_DATA {
19316    type Message = MavMessage;
19317    const ID: u32 = 40u32;
19318    const NAME: &'static str = "MISSION_REQUEST";
19319    const EXTRA_CRC: u8 = 230u8;
19320    const ENCODED_LEN: usize = 5usize;
19321    fn deser(
19322        _version: MavlinkVersion,
19323        __input: &[u8],
19324    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19325        let avail_len = __input.len();
19326        let mut payload_buf = [0; Self::ENCODED_LEN];
19327        let mut buf = if avail_len < Self::ENCODED_LEN {
19328            payload_buf[0..avail_len].copy_from_slice(__input);
19329            Bytes::new(&payload_buf)
19330        } else {
19331            Bytes::new(__input)
19332        };
19333        let mut __struct = Self::default();
19334        __struct.seq = buf.get_u16_le();
19335        __struct.target_system = buf.get_u8();
19336        __struct.target_component = buf.get_u8();
19337        let tmp = buf.get_u8();
19338        __struct.mission_type =
19339            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19340                enum_type: "MavMissionType",
19341                value: tmp as u32,
19342            })?;
19343        Ok(__struct)
19344    }
19345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19346        let mut __tmp = BytesMut::new(bytes);
19347        #[allow(clippy::absurd_extreme_comparisons)]
19348        #[allow(unused_comparisons)]
19349        if __tmp.remaining() < Self::ENCODED_LEN {
19350            panic!(
19351                "buffer is too small (need {} bytes, but got {})",
19352                Self::ENCODED_LEN,
19353                __tmp.remaining(),
19354            )
19355        }
19356        __tmp.put_u16_le(self.seq);
19357        __tmp.put_u8(self.target_system);
19358        __tmp.put_u8(self.target_component);
19359        __tmp.put_u8(self.mission_type as u8);
19360        if matches!(version, MavlinkVersion::V2) {
19361            let len = __tmp.len();
19362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19363        } else {
19364            __tmp.len()
19365        }
19366    }
19367}
19368#[doc = "id: 51"]
19369#[doc = "Request the information of the mission item with the sequence number seq. The response of the system to this message should be a MISSION_ITEM_INT message. <https://mavlink.io/en/services/mission.html>."]
19370#[derive(Debug, Clone, PartialEq)]
19371#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19372#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19373pub struct MISSION_REQUEST_INT_DATA {
19374    #[doc = "Sequence"]
19375    pub seq: u16,
19376    #[doc = "System ID"]
19377    pub target_system: u8,
19378    #[doc = "Component ID"]
19379    pub target_component: u8,
19380    #[doc = "Mission type."]
19381    #[cfg_attr(feature = "serde", serde(default))]
19382    pub mission_type: MavMissionType,
19383}
19384impl MISSION_REQUEST_INT_DATA {
19385    pub const ENCODED_LEN: usize = 5usize;
19386    pub const DEFAULT: Self = Self {
19387        seq: 0_u16,
19388        target_system: 0_u8,
19389        target_component: 0_u8,
19390        mission_type: MavMissionType::DEFAULT,
19391    };
19392    #[cfg(feature = "arbitrary")]
19393    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19394        use arbitrary::{Arbitrary, Unstructured};
19395        let mut buf = [0u8; 1024];
19396        rng.fill_bytes(&mut buf);
19397        let mut unstructured = Unstructured::new(&buf);
19398        Self::arbitrary(&mut unstructured).unwrap_or_default()
19399    }
19400}
19401impl Default for MISSION_REQUEST_INT_DATA {
19402    fn default() -> Self {
19403        Self::DEFAULT.clone()
19404    }
19405}
19406impl MessageData for MISSION_REQUEST_INT_DATA {
19407    type Message = MavMessage;
19408    const ID: u32 = 51u32;
19409    const NAME: &'static str = "MISSION_REQUEST_INT";
19410    const EXTRA_CRC: u8 = 196u8;
19411    const ENCODED_LEN: usize = 5usize;
19412    fn deser(
19413        _version: MavlinkVersion,
19414        __input: &[u8],
19415    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19416        let avail_len = __input.len();
19417        let mut payload_buf = [0; Self::ENCODED_LEN];
19418        let mut buf = if avail_len < Self::ENCODED_LEN {
19419            payload_buf[0..avail_len].copy_from_slice(__input);
19420            Bytes::new(&payload_buf)
19421        } else {
19422            Bytes::new(__input)
19423        };
19424        let mut __struct = Self::default();
19425        __struct.seq = buf.get_u16_le();
19426        __struct.target_system = buf.get_u8();
19427        __struct.target_component = buf.get_u8();
19428        let tmp = buf.get_u8();
19429        __struct.mission_type =
19430            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19431                enum_type: "MavMissionType",
19432                value: tmp as u32,
19433            })?;
19434        Ok(__struct)
19435    }
19436    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19437        let mut __tmp = BytesMut::new(bytes);
19438        #[allow(clippy::absurd_extreme_comparisons)]
19439        #[allow(unused_comparisons)]
19440        if __tmp.remaining() < Self::ENCODED_LEN {
19441            panic!(
19442                "buffer is too small (need {} bytes, but got {})",
19443                Self::ENCODED_LEN,
19444                __tmp.remaining(),
19445            )
19446        }
19447        __tmp.put_u16_le(self.seq);
19448        __tmp.put_u8(self.target_system);
19449        __tmp.put_u8(self.target_component);
19450        __tmp.put_u8(self.mission_type as u8);
19451        if matches!(version, MavlinkVersion::V2) {
19452            let len = __tmp.len();
19453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19454        } else {
19455            __tmp.len()
19456        }
19457    }
19458}
19459#[doc = "id: 43"]
19460#[doc = "Request the overall list of mission items from the system/component."]
19461#[derive(Debug, Clone, PartialEq)]
19462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19464pub struct MISSION_REQUEST_LIST_DATA {
19465    #[doc = "System ID"]
19466    pub target_system: u8,
19467    #[doc = "Component ID"]
19468    pub target_component: u8,
19469    #[doc = "Mission type."]
19470    #[cfg_attr(feature = "serde", serde(default))]
19471    pub mission_type: MavMissionType,
19472}
19473impl MISSION_REQUEST_LIST_DATA {
19474    pub const ENCODED_LEN: usize = 3usize;
19475    pub const DEFAULT: Self = Self {
19476        target_system: 0_u8,
19477        target_component: 0_u8,
19478        mission_type: MavMissionType::DEFAULT,
19479    };
19480    #[cfg(feature = "arbitrary")]
19481    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19482        use arbitrary::{Arbitrary, Unstructured};
19483        let mut buf = [0u8; 1024];
19484        rng.fill_bytes(&mut buf);
19485        let mut unstructured = Unstructured::new(&buf);
19486        Self::arbitrary(&mut unstructured).unwrap_or_default()
19487    }
19488}
19489impl Default for MISSION_REQUEST_LIST_DATA {
19490    fn default() -> Self {
19491        Self::DEFAULT.clone()
19492    }
19493}
19494impl MessageData for MISSION_REQUEST_LIST_DATA {
19495    type Message = MavMessage;
19496    const ID: u32 = 43u32;
19497    const NAME: &'static str = "MISSION_REQUEST_LIST";
19498    const EXTRA_CRC: u8 = 132u8;
19499    const ENCODED_LEN: usize = 3usize;
19500    fn deser(
19501        _version: MavlinkVersion,
19502        __input: &[u8],
19503    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19504        let avail_len = __input.len();
19505        let mut payload_buf = [0; Self::ENCODED_LEN];
19506        let mut buf = if avail_len < Self::ENCODED_LEN {
19507            payload_buf[0..avail_len].copy_from_slice(__input);
19508            Bytes::new(&payload_buf)
19509        } else {
19510            Bytes::new(__input)
19511        };
19512        let mut __struct = Self::default();
19513        __struct.target_system = buf.get_u8();
19514        __struct.target_component = buf.get_u8();
19515        let tmp = buf.get_u8();
19516        __struct.mission_type =
19517            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19518                enum_type: "MavMissionType",
19519                value: tmp as u32,
19520            })?;
19521        Ok(__struct)
19522    }
19523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19524        let mut __tmp = BytesMut::new(bytes);
19525        #[allow(clippy::absurd_extreme_comparisons)]
19526        #[allow(unused_comparisons)]
19527        if __tmp.remaining() < Self::ENCODED_LEN {
19528            panic!(
19529                "buffer is too small (need {} bytes, but got {})",
19530                Self::ENCODED_LEN,
19531                __tmp.remaining(),
19532            )
19533        }
19534        __tmp.put_u8(self.target_system);
19535        __tmp.put_u8(self.target_component);
19536        __tmp.put_u8(self.mission_type as u8);
19537        if matches!(version, MavlinkVersion::V2) {
19538            let len = __tmp.len();
19539            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19540        } else {
19541            __tmp.len()
19542        }
19543    }
19544}
19545#[doc = "id: 37"]
19546#[doc = "Request a partial list of mission items from the system/component. <https://mavlink.io/en/services/mission.html>. If start and end index are the same, just send one waypoint."]
19547#[derive(Debug, Clone, PartialEq)]
19548#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19549#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19550pub struct MISSION_REQUEST_PARTIAL_LIST_DATA {
19551    #[doc = "Start index"]
19552    pub start_index: i16,
19553    #[doc = "End index, -1 by default (-1: send list to end). Else a valid index of the list"]
19554    pub end_index: i16,
19555    #[doc = "System ID"]
19556    pub target_system: u8,
19557    #[doc = "Component ID"]
19558    pub target_component: u8,
19559    #[doc = "Mission type."]
19560    #[cfg_attr(feature = "serde", serde(default))]
19561    pub mission_type: MavMissionType,
19562}
19563impl MISSION_REQUEST_PARTIAL_LIST_DATA {
19564    pub const ENCODED_LEN: usize = 7usize;
19565    pub const DEFAULT: Self = Self {
19566        start_index: 0_i16,
19567        end_index: 0_i16,
19568        target_system: 0_u8,
19569        target_component: 0_u8,
19570        mission_type: MavMissionType::DEFAULT,
19571    };
19572    #[cfg(feature = "arbitrary")]
19573    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19574        use arbitrary::{Arbitrary, Unstructured};
19575        let mut buf = [0u8; 1024];
19576        rng.fill_bytes(&mut buf);
19577        let mut unstructured = Unstructured::new(&buf);
19578        Self::arbitrary(&mut unstructured).unwrap_or_default()
19579    }
19580}
19581impl Default for MISSION_REQUEST_PARTIAL_LIST_DATA {
19582    fn default() -> Self {
19583        Self::DEFAULT.clone()
19584    }
19585}
19586impl MessageData for MISSION_REQUEST_PARTIAL_LIST_DATA {
19587    type Message = MavMessage;
19588    const ID: u32 = 37u32;
19589    const NAME: &'static str = "MISSION_REQUEST_PARTIAL_LIST";
19590    const EXTRA_CRC: u8 = 212u8;
19591    const ENCODED_LEN: usize = 7usize;
19592    fn deser(
19593        _version: MavlinkVersion,
19594        __input: &[u8],
19595    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19596        let avail_len = __input.len();
19597        let mut payload_buf = [0; Self::ENCODED_LEN];
19598        let mut buf = if avail_len < Self::ENCODED_LEN {
19599            payload_buf[0..avail_len].copy_from_slice(__input);
19600            Bytes::new(&payload_buf)
19601        } else {
19602            Bytes::new(__input)
19603        };
19604        let mut __struct = Self::default();
19605        __struct.start_index = buf.get_i16_le();
19606        __struct.end_index = buf.get_i16_le();
19607        __struct.target_system = buf.get_u8();
19608        __struct.target_component = buf.get_u8();
19609        let tmp = buf.get_u8();
19610        __struct.mission_type =
19611            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19612                enum_type: "MavMissionType",
19613                value: tmp as u32,
19614            })?;
19615        Ok(__struct)
19616    }
19617    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19618        let mut __tmp = BytesMut::new(bytes);
19619        #[allow(clippy::absurd_extreme_comparisons)]
19620        #[allow(unused_comparisons)]
19621        if __tmp.remaining() < Self::ENCODED_LEN {
19622            panic!(
19623                "buffer is too small (need {} bytes, but got {})",
19624                Self::ENCODED_LEN,
19625                __tmp.remaining(),
19626            )
19627        }
19628        __tmp.put_i16_le(self.start_index);
19629        __tmp.put_i16_le(self.end_index);
19630        __tmp.put_u8(self.target_system);
19631        __tmp.put_u8(self.target_component);
19632        __tmp.put_u8(self.mission_type as u8);
19633        if matches!(version, MavlinkVersion::V2) {
19634            let len = __tmp.len();
19635            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19636        } else {
19637            __tmp.len()
19638        }
19639    }
19640}
19641#[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
19642#[doc = "id: 41"]
19643#[doc = "Set the mission item with sequence number seq as the current item and emit MISSION_CURRENT (whether or not the mission number changed).         If a mission is currently being executed, the system will continue to this new mission item on the shortest path, skipping any intermediate mission items.         Note that mission jump repeat counters are not reset (see MAV_CMD_DO_JUMP param2).          This message may trigger a mission state-machine change on some systems: for example from MISSION_STATE_NOT_STARTED or MISSION_STATE_PAUSED to MISSION_STATE_ACTIVE.         If the system is in mission mode, on those systems this command might therefore start, restart or resume the mission.         If the system is not in mission mode this message must not trigger a switch to mission mode."]
19644#[derive(Debug, Clone, PartialEq)]
19645#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19646#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19647pub struct MISSION_SET_CURRENT_DATA {
19648    #[doc = "Sequence"]
19649    pub seq: u16,
19650    #[doc = "System ID"]
19651    pub target_system: u8,
19652    #[doc = "Component ID"]
19653    pub target_component: u8,
19654}
19655impl MISSION_SET_CURRENT_DATA {
19656    pub const ENCODED_LEN: usize = 4usize;
19657    pub const DEFAULT: Self = Self {
19658        seq: 0_u16,
19659        target_system: 0_u8,
19660        target_component: 0_u8,
19661    };
19662    #[cfg(feature = "arbitrary")]
19663    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19664        use arbitrary::{Arbitrary, Unstructured};
19665        let mut buf = [0u8; 1024];
19666        rng.fill_bytes(&mut buf);
19667        let mut unstructured = Unstructured::new(&buf);
19668        Self::arbitrary(&mut unstructured).unwrap_or_default()
19669    }
19670}
19671impl Default for MISSION_SET_CURRENT_DATA {
19672    fn default() -> Self {
19673        Self::DEFAULT.clone()
19674    }
19675}
19676impl MessageData for MISSION_SET_CURRENT_DATA {
19677    type Message = MavMessage;
19678    const ID: u32 = 41u32;
19679    const NAME: &'static str = "MISSION_SET_CURRENT";
19680    const EXTRA_CRC: u8 = 28u8;
19681    const ENCODED_LEN: usize = 4usize;
19682    fn deser(
19683        _version: MavlinkVersion,
19684        __input: &[u8],
19685    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19686        let avail_len = __input.len();
19687        let mut payload_buf = [0; Self::ENCODED_LEN];
19688        let mut buf = if avail_len < Self::ENCODED_LEN {
19689            payload_buf[0..avail_len].copy_from_slice(__input);
19690            Bytes::new(&payload_buf)
19691        } else {
19692            Bytes::new(__input)
19693        };
19694        let mut __struct = Self::default();
19695        __struct.seq = buf.get_u16_le();
19696        __struct.target_system = buf.get_u8();
19697        __struct.target_component = buf.get_u8();
19698        Ok(__struct)
19699    }
19700    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19701        let mut __tmp = BytesMut::new(bytes);
19702        #[allow(clippy::absurd_extreme_comparisons)]
19703        #[allow(unused_comparisons)]
19704        if __tmp.remaining() < Self::ENCODED_LEN {
19705            panic!(
19706                "buffer is too small (need {} bytes, but got {})",
19707                Self::ENCODED_LEN,
19708                __tmp.remaining(),
19709            )
19710        }
19711        __tmp.put_u16_le(self.seq);
19712        __tmp.put_u8(self.target_system);
19713        __tmp.put_u8(self.target_component);
19714        if matches!(version, MavlinkVersion::V2) {
19715            let len = __tmp.len();
19716            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19717        } else {
19718            __tmp.len()
19719        }
19720    }
19721}
19722#[doc = "id: 38"]
19723#[doc = "This message is sent to the MAV to write a partial list. If start index == end index, only one item will be transmitted / updated. If the start index is NOT 0 and above the current list size, this request should be REJECTED!."]
19724#[derive(Debug, Clone, PartialEq)]
19725#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19726#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19727pub struct MISSION_WRITE_PARTIAL_LIST_DATA {
19728    #[doc = "Start index. Must be smaller / equal to the largest index of the current onboard list."]
19729    pub start_index: i16,
19730    #[doc = "End index, equal or greater than start index."]
19731    pub end_index: i16,
19732    #[doc = "System ID"]
19733    pub target_system: u8,
19734    #[doc = "Component ID"]
19735    pub target_component: u8,
19736    #[doc = "Mission type."]
19737    #[cfg_attr(feature = "serde", serde(default))]
19738    pub mission_type: MavMissionType,
19739}
19740impl MISSION_WRITE_PARTIAL_LIST_DATA {
19741    pub const ENCODED_LEN: usize = 7usize;
19742    pub const DEFAULT: Self = Self {
19743        start_index: 0_i16,
19744        end_index: 0_i16,
19745        target_system: 0_u8,
19746        target_component: 0_u8,
19747        mission_type: MavMissionType::DEFAULT,
19748    };
19749    #[cfg(feature = "arbitrary")]
19750    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19751        use arbitrary::{Arbitrary, Unstructured};
19752        let mut buf = [0u8; 1024];
19753        rng.fill_bytes(&mut buf);
19754        let mut unstructured = Unstructured::new(&buf);
19755        Self::arbitrary(&mut unstructured).unwrap_or_default()
19756    }
19757}
19758impl Default for MISSION_WRITE_PARTIAL_LIST_DATA {
19759    fn default() -> Self {
19760        Self::DEFAULT.clone()
19761    }
19762}
19763impl MessageData for MISSION_WRITE_PARTIAL_LIST_DATA {
19764    type Message = MavMessage;
19765    const ID: u32 = 38u32;
19766    const NAME: &'static str = "MISSION_WRITE_PARTIAL_LIST";
19767    const EXTRA_CRC: u8 = 9u8;
19768    const ENCODED_LEN: usize = 7usize;
19769    fn deser(
19770        _version: MavlinkVersion,
19771        __input: &[u8],
19772    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19773        let avail_len = __input.len();
19774        let mut payload_buf = [0; Self::ENCODED_LEN];
19775        let mut buf = if avail_len < Self::ENCODED_LEN {
19776            payload_buf[0..avail_len].copy_from_slice(__input);
19777            Bytes::new(&payload_buf)
19778        } else {
19779            Bytes::new(__input)
19780        };
19781        let mut __struct = Self::default();
19782        __struct.start_index = buf.get_i16_le();
19783        __struct.end_index = buf.get_i16_le();
19784        __struct.target_system = buf.get_u8();
19785        __struct.target_component = buf.get_u8();
19786        let tmp = buf.get_u8();
19787        __struct.mission_type =
19788            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
19789                enum_type: "MavMissionType",
19790                value: tmp as u32,
19791            })?;
19792        Ok(__struct)
19793    }
19794    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19795        let mut __tmp = BytesMut::new(bytes);
19796        #[allow(clippy::absurd_extreme_comparisons)]
19797        #[allow(unused_comparisons)]
19798        if __tmp.remaining() < Self::ENCODED_LEN {
19799            panic!(
19800                "buffer is too small (need {} bytes, but got {})",
19801                Self::ENCODED_LEN,
19802                __tmp.remaining(),
19803            )
19804        }
19805        __tmp.put_i16_le(self.start_index);
19806        __tmp.put_i16_le(self.end_index);
19807        __tmp.put_u8(self.target_system);
19808        __tmp.put_u8(self.target_component);
19809        __tmp.put_u8(self.mission_type as u8);
19810        if matches!(version, MavlinkVersion::V2) {
19811            let len = __tmp.len();
19812            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19813        } else {
19814            __tmp.len()
19815        }
19816    }
19817}
19818#[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
19819#[doc = "id: 265"]
19820#[doc = "Orientation of a mount."]
19821#[derive(Debug, Clone, PartialEq)]
19822#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19823#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19824pub struct MOUNT_ORIENTATION_DATA {
19825    #[doc = "Timestamp (time since system boot)."]
19826    pub time_boot_ms: u32,
19827    #[doc = "Roll in global frame (set to NaN for invalid)."]
19828    pub roll: f32,
19829    #[doc = "Pitch in global frame (set to NaN for invalid)."]
19830    pub pitch: f32,
19831    #[doc = "Yaw relative to vehicle (set to NaN for invalid)."]
19832    pub yaw: f32,
19833    #[doc = "Yaw in absolute frame relative to Earth's North, north is 0 (set to NaN for invalid)."]
19834    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
19835    pub yaw_absolute: f32,
19836}
19837impl MOUNT_ORIENTATION_DATA {
19838    pub const ENCODED_LEN: usize = 20usize;
19839    pub const DEFAULT: Self = Self {
19840        time_boot_ms: 0_u32,
19841        roll: 0.0_f32,
19842        pitch: 0.0_f32,
19843        yaw: 0.0_f32,
19844        yaw_absolute: 0.0_f32,
19845    };
19846    #[cfg(feature = "arbitrary")]
19847    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19848        use arbitrary::{Arbitrary, Unstructured};
19849        let mut buf = [0u8; 1024];
19850        rng.fill_bytes(&mut buf);
19851        let mut unstructured = Unstructured::new(&buf);
19852        Self::arbitrary(&mut unstructured).unwrap_or_default()
19853    }
19854}
19855impl Default for MOUNT_ORIENTATION_DATA {
19856    fn default() -> Self {
19857        Self::DEFAULT.clone()
19858    }
19859}
19860impl MessageData for MOUNT_ORIENTATION_DATA {
19861    type Message = MavMessage;
19862    const ID: u32 = 265u32;
19863    const NAME: &'static str = "MOUNT_ORIENTATION";
19864    const EXTRA_CRC: u8 = 26u8;
19865    const ENCODED_LEN: usize = 20usize;
19866    fn deser(
19867        _version: MavlinkVersion,
19868        __input: &[u8],
19869    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19870        let avail_len = __input.len();
19871        let mut payload_buf = [0; Self::ENCODED_LEN];
19872        let mut buf = if avail_len < Self::ENCODED_LEN {
19873            payload_buf[0..avail_len].copy_from_slice(__input);
19874            Bytes::new(&payload_buf)
19875        } else {
19876            Bytes::new(__input)
19877        };
19878        let mut __struct = Self::default();
19879        __struct.time_boot_ms = buf.get_u32_le();
19880        __struct.roll = buf.get_f32_le();
19881        __struct.pitch = buf.get_f32_le();
19882        __struct.yaw = buf.get_f32_le();
19883        __struct.yaw_absolute = buf.get_f32_le();
19884        Ok(__struct)
19885    }
19886    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19887        let mut __tmp = BytesMut::new(bytes);
19888        #[allow(clippy::absurd_extreme_comparisons)]
19889        #[allow(unused_comparisons)]
19890        if __tmp.remaining() < Self::ENCODED_LEN {
19891            panic!(
19892                "buffer is too small (need {} bytes, but got {})",
19893                Self::ENCODED_LEN,
19894                __tmp.remaining(),
19895            )
19896        }
19897        __tmp.put_u32_le(self.time_boot_ms);
19898        __tmp.put_f32_le(self.roll);
19899        __tmp.put_f32_le(self.pitch);
19900        __tmp.put_f32_le(self.yaw);
19901        __tmp.put_f32_le(self.yaw_absolute);
19902        if matches!(version, MavlinkVersion::V2) {
19903            let len = __tmp.len();
19904            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19905        } else {
19906            __tmp.len()
19907        }
19908    }
19909}
19910#[doc = "id: 251"]
19911#[doc = "Send a key-value pair as float. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19912#[derive(Debug, Clone, PartialEq)]
19913#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
19914#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
19915pub struct NAMED_VALUE_FLOAT_DATA {
19916    #[doc = "Timestamp (time since system boot)."]
19917    pub time_boot_ms: u32,
19918    #[doc = "Floating point value"]
19919    pub value: f32,
19920    #[doc = "Name of the debug variable"]
19921    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
19922    pub name: [u8; 10],
19923}
19924impl NAMED_VALUE_FLOAT_DATA {
19925    pub const ENCODED_LEN: usize = 18usize;
19926    pub const DEFAULT: Self = Self {
19927        time_boot_ms: 0_u32,
19928        value: 0.0_f32,
19929        name: [0_u8; 10usize],
19930    };
19931    #[cfg(feature = "arbitrary")]
19932    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
19933        use arbitrary::{Arbitrary, Unstructured};
19934        let mut buf = [0u8; 1024];
19935        rng.fill_bytes(&mut buf);
19936        let mut unstructured = Unstructured::new(&buf);
19937        Self::arbitrary(&mut unstructured).unwrap_or_default()
19938    }
19939}
19940impl Default for NAMED_VALUE_FLOAT_DATA {
19941    fn default() -> Self {
19942        Self::DEFAULT.clone()
19943    }
19944}
19945impl MessageData for NAMED_VALUE_FLOAT_DATA {
19946    type Message = MavMessage;
19947    const ID: u32 = 251u32;
19948    const NAME: &'static str = "NAMED_VALUE_FLOAT";
19949    const EXTRA_CRC: u8 = 170u8;
19950    const ENCODED_LEN: usize = 18usize;
19951    fn deser(
19952        _version: MavlinkVersion,
19953        __input: &[u8],
19954    ) -> Result<Self, ::mavlink_core::error::ParserError> {
19955        let avail_len = __input.len();
19956        let mut payload_buf = [0; Self::ENCODED_LEN];
19957        let mut buf = if avail_len < Self::ENCODED_LEN {
19958            payload_buf[0..avail_len].copy_from_slice(__input);
19959            Bytes::new(&payload_buf)
19960        } else {
19961            Bytes::new(__input)
19962        };
19963        let mut __struct = Self::default();
19964        __struct.time_boot_ms = buf.get_u32_le();
19965        __struct.value = buf.get_f32_le();
19966        for v in &mut __struct.name {
19967            let val = buf.get_u8();
19968            *v = val;
19969        }
19970        Ok(__struct)
19971    }
19972    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
19973        let mut __tmp = BytesMut::new(bytes);
19974        #[allow(clippy::absurd_extreme_comparisons)]
19975        #[allow(unused_comparisons)]
19976        if __tmp.remaining() < Self::ENCODED_LEN {
19977            panic!(
19978                "buffer is too small (need {} bytes, but got {})",
19979                Self::ENCODED_LEN,
19980                __tmp.remaining(),
19981            )
19982        }
19983        __tmp.put_u32_le(self.time_boot_ms);
19984        __tmp.put_f32_le(self.value);
19985        for val in &self.name {
19986            __tmp.put_u8(*val);
19987        }
19988        if matches!(version, MavlinkVersion::V2) {
19989            let len = __tmp.len();
19990            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
19991        } else {
19992            __tmp.len()
19993        }
19994    }
19995}
19996#[doc = "id: 252"]
19997#[doc = "Send a key-value pair as integer. The use of this message is discouraged for normal packets, but a quite efficient way for testing new messages and getting experimental debug output."]
19998#[derive(Debug, Clone, PartialEq)]
19999#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20000#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20001pub struct NAMED_VALUE_INT_DATA {
20002    #[doc = "Timestamp (time since system boot)."]
20003    pub time_boot_ms: u32,
20004    #[doc = "Signed integer value"]
20005    pub value: i32,
20006    #[doc = "Name of the debug variable"]
20007    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20008    pub name: [u8; 10],
20009}
20010impl NAMED_VALUE_INT_DATA {
20011    pub const ENCODED_LEN: usize = 18usize;
20012    pub const DEFAULT: Self = Self {
20013        time_boot_ms: 0_u32,
20014        value: 0_i32,
20015        name: [0_u8; 10usize],
20016    };
20017    #[cfg(feature = "arbitrary")]
20018    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20019        use arbitrary::{Arbitrary, Unstructured};
20020        let mut buf = [0u8; 1024];
20021        rng.fill_bytes(&mut buf);
20022        let mut unstructured = Unstructured::new(&buf);
20023        Self::arbitrary(&mut unstructured).unwrap_or_default()
20024    }
20025}
20026impl Default for NAMED_VALUE_INT_DATA {
20027    fn default() -> Self {
20028        Self::DEFAULT.clone()
20029    }
20030}
20031impl MessageData for NAMED_VALUE_INT_DATA {
20032    type Message = MavMessage;
20033    const ID: u32 = 252u32;
20034    const NAME: &'static str = "NAMED_VALUE_INT";
20035    const EXTRA_CRC: u8 = 44u8;
20036    const ENCODED_LEN: usize = 18usize;
20037    fn deser(
20038        _version: MavlinkVersion,
20039        __input: &[u8],
20040    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20041        let avail_len = __input.len();
20042        let mut payload_buf = [0; Self::ENCODED_LEN];
20043        let mut buf = if avail_len < Self::ENCODED_LEN {
20044            payload_buf[0..avail_len].copy_from_slice(__input);
20045            Bytes::new(&payload_buf)
20046        } else {
20047            Bytes::new(__input)
20048        };
20049        let mut __struct = Self::default();
20050        __struct.time_boot_ms = buf.get_u32_le();
20051        __struct.value = buf.get_i32_le();
20052        for v in &mut __struct.name {
20053            let val = buf.get_u8();
20054            *v = val;
20055        }
20056        Ok(__struct)
20057    }
20058    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20059        let mut __tmp = BytesMut::new(bytes);
20060        #[allow(clippy::absurd_extreme_comparisons)]
20061        #[allow(unused_comparisons)]
20062        if __tmp.remaining() < Self::ENCODED_LEN {
20063            panic!(
20064                "buffer is too small (need {} bytes, but got {})",
20065                Self::ENCODED_LEN,
20066                __tmp.remaining(),
20067            )
20068        }
20069        __tmp.put_u32_le(self.time_boot_ms);
20070        __tmp.put_i32_le(self.value);
20071        for val in &self.name {
20072            __tmp.put_u8(*val);
20073        }
20074        if matches!(version, MavlinkVersion::V2) {
20075            let len = __tmp.len();
20076            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20077        } else {
20078            __tmp.len()
20079        }
20080    }
20081}
20082#[doc = "id: 62"]
20083#[doc = "The state of the navigation and position controller."]
20084#[derive(Debug, Clone, PartialEq)]
20085#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20086#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20087pub struct NAV_CONTROLLER_OUTPUT_DATA {
20088    #[doc = "Current desired roll"]
20089    pub nav_roll: f32,
20090    #[doc = "Current desired pitch"]
20091    pub nav_pitch: f32,
20092    #[doc = "Current altitude error"]
20093    pub alt_error: f32,
20094    #[doc = "Current airspeed error"]
20095    pub aspd_error: f32,
20096    #[doc = "Current crosstrack error on x-y plane"]
20097    pub xtrack_error: f32,
20098    #[doc = "Current desired heading"]
20099    pub nav_bearing: i16,
20100    #[doc = "Bearing to current waypoint/target"]
20101    pub target_bearing: i16,
20102    #[doc = "Distance to active waypoint"]
20103    pub wp_dist: u16,
20104}
20105impl NAV_CONTROLLER_OUTPUT_DATA {
20106    pub const ENCODED_LEN: usize = 26usize;
20107    pub const DEFAULT: Self = Self {
20108        nav_roll: 0.0_f32,
20109        nav_pitch: 0.0_f32,
20110        alt_error: 0.0_f32,
20111        aspd_error: 0.0_f32,
20112        xtrack_error: 0.0_f32,
20113        nav_bearing: 0_i16,
20114        target_bearing: 0_i16,
20115        wp_dist: 0_u16,
20116    };
20117    #[cfg(feature = "arbitrary")]
20118    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20119        use arbitrary::{Arbitrary, Unstructured};
20120        let mut buf = [0u8; 1024];
20121        rng.fill_bytes(&mut buf);
20122        let mut unstructured = Unstructured::new(&buf);
20123        Self::arbitrary(&mut unstructured).unwrap_or_default()
20124    }
20125}
20126impl Default for NAV_CONTROLLER_OUTPUT_DATA {
20127    fn default() -> Self {
20128        Self::DEFAULT.clone()
20129    }
20130}
20131impl MessageData for NAV_CONTROLLER_OUTPUT_DATA {
20132    type Message = MavMessage;
20133    const ID: u32 = 62u32;
20134    const NAME: &'static str = "NAV_CONTROLLER_OUTPUT";
20135    const EXTRA_CRC: u8 = 183u8;
20136    const ENCODED_LEN: usize = 26usize;
20137    fn deser(
20138        _version: MavlinkVersion,
20139        __input: &[u8],
20140    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20141        let avail_len = __input.len();
20142        let mut payload_buf = [0; Self::ENCODED_LEN];
20143        let mut buf = if avail_len < Self::ENCODED_LEN {
20144            payload_buf[0..avail_len].copy_from_slice(__input);
20145            Bytes::new(&payload_buf)
20146        } else {
20147            Bytes::new(__input)
20148        };
20149        let mut __struct = Self::default();
20150        __struct.nav_roll = buf.get_f32_le();
20151        __struct.nav_pitch = buf.get_f32_le();
20152        __struct.alt_error = buf.get_f32_le();
20153        __struct.aspd_error = buf.get_f32_le();
20154        __struct.xtrack_error = buf.get_f32_le();
20155        __struct.nav_bearing = buf.get_i16_le();
20156        __struct.target_bearing = buf.get_i16_le();
20157        __struct.wp_dist = buf.get_u16_le();
20158        Ok(__struct)
20159    }
20160    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20161        let mut __tmp = BytesMut::new(bytes);
20162        #[allow(clippy::absurd_extreme_comparisons)]
20163        #[allow(unused_comparisons)]
20164        if __tmp.remaining() < Self::ENCODED_LEN {
20165            panic!(
20166                "buffer is too small (need {} bytes, but got {})",
20167                Self::ENCODED_LEN,
20168                __tmp.remaining(),
20169            )
20170        }
20171        __tmp.put_f32_le(self.nav_roll);
20172        __tmp.put_f32_le(self.nav_pitch);
20173        __tmp.put_f32_le(self.alt_error);
20174        __tmp.put_f32_le(self.aspd_error);
20175        __tmp.put_f32_le(self.xtrack_error);
20176        __tmp.put_i16_le(self.nav_bearing);
20177        __tmp.put_i16_le(self.target_bearing);
20178        __tmp.put_u16_le(self.wp_dist);
20179        if matches!(version, MavlinkVersion::V2) {
20180            let len = __tmp.len();
20181            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20182        } else {
20183            __tmp.len()
20184        }
20185    }
20186}
20187#[doc = "id: 220"]
20188#[doc = "Accelerometer and Gyro biases from the navigation filter."]
20189#[derive(Debug, Clone, PartialEq)]
20190#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20191#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20192pub struct NAV_FILTER_BIAS_DATA {
20193    #[doc = "Timestamp (microseconds)"]
20194    pub usec: u64,
20195    #[doc = "b_f[0]"]
20196    pub accel_0: f32,
20197    #[doc = "b_f[1]"]
20198    pub accel_1: f32,
20199    #[doc = "b_f[2]"]
20200    pub accel_2: f32,
20201    #[doc = "b_f[0]"]
20202    pub gyro_0: f32,
20203    #[doc = "b_f[1]"]
20204    pub gyro_1: f32,
20205    #[doc = "b_f[2]"]
20206    pub gyro_2: f32,
20207}
20208impl NAV_FILTER_BIAS_DATA {
20209    pub const ENCODED_LEN: usize = 32usize;
20210    pub const DEFAULT: Self = Self {
20211        usec: 0_u64,
20212        accel_0: 0.0_f32,
20213        accel_1: 0.0_f32,
20214        accel_2: 0.0_f32,
20215        gyro_0: 0.0_f32,
20216        gyro_1: 0.0_f32,
20217        gyro_2: 0.0_f32,
20218    };
20219    #[cfg(feature = "arbitrary")]
20220    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20221        use arbitrary::{Arbitrary, Unstructured};
20222        let mut buf = [0u8; 1024];
20223        rng.fill_bytes(&mut buf);
20224        let mut unstructured = Unstructured::new(&buf);
20225        Self::arbitrary(&mut unstructured).unwrap_or_default()
20226    }
20227}
20228impl Default for NAV_FILTER_BIAS_DATA {
20229    fn default() -> Self {
20230        Self::DEFAULT.clone()
20231    }
20232}
20233impl MessageData for NAV_FILTER_BIAS_DATA {
20234    type Message = MavMessage;
20235    const ID: u32 = 220u32;
20236    const NAME: &'static str = "NAV_FILTER_BIAS";
20237    const EXTRA_CRC: u8 = 34u8;
20238    const ENCODED_LEN: usize = 32usize;
20239    fn deser(
20240        _version: MavlinkVersion,
20241        __input: &[u8],
20242    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20243        let avail_len = __input.len();
20244        let mut payload_buf = [0; Self::ENCODED_LEN];
20245        let mut buf = if avail_len < Self::ENCODED_LEN {
20246            payload_buf[0..avail_len].copy_from_slice(__input);
20247            Bytes::new(&payload_buf)
20248        } else {
20249            Bytes::new(__input)
20250        };
20251        let mut __struct = Self::default();
20252        __struct.usec = buf.get_u64_le();
20253        __struct.accel_0 = buf.get_f32_le();
20254        __struct.accel_1 = buf.get_f32_le();
20255        __struct.accel_2 = buf.get_f32_le();
20256        __struct.gyro_0 = buf.get_f32_le();
20257        __struct.gyro_1 = buf.get_f32_le();
20258        __struct.gyro_2 = buf.get_f32_le();
20259        Ok(__struct)
20260    }
20261    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20262        let mut __tmp = BytesMut::new(bytes);
20263        #[allow(clippy::absurd_extreme_comparisons)]
20264        #[allow(unused_comparisons)]
20265        if __tmp.remaining() < Self::ENCODED_LEN {
20266            panic!(
20267                "buffer is too small (need {} bytes, but got {})",
20268                Self::ENCODED_LEN,
20269                __tmp.remaining(),
20270            )
20271        }
20272        __tmp.put_u64_le(self.usec);
20273        __tmp.put_f32_le(self.accel_0);
20274        __tmp.put_f32_le(self.accel_1);
20275        __tmp.put_f32_le(self.accel_2);
20276        __tmp.put_f32_le(self.gyro_0);
20277        __tmp.put_f32_le(self.gyro_1);
20278        __tmp.put_f32_le(self.gyro_2);
20279        if matches!(version, MavlinkVersion::V2) {
20280            let len = __tmp.len();
20281            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20282        } else {
20283            __tmp.len()
20284        }
20285    }
20286}
20287#[doc = "id: 330"]
20288#[doc = "Obstacle distances in front of the sensor, starting from the left in increment degrees to the right."]
20289#[derive(Debug, Clone, PartialEq)]
20290#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20291#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20292pub struct OBSTACLE_DISTANCE_DATA {
20293    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20294    pub time_usec: u64,
20295    #[doc = "Distance of obstacles around the vehicle with index 0 corresponding to north + angle_offset, unless otherwise specified in the frame. A value of 0 is valid and means that the obstacle is practically touching the sensor. A value of max_distance +1 means no obstacle is present. A value of UINT16_MAX for unknown/not used. In a array element, one unit corresponds to 1cm."]
20296    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20297    pub distances: [u16; 72],
20298    #[doc = "Minimum distance the sensor can measure."]
20299    pub min_distance: u16,
20300    #[doc = "Maximum distance the sensor can measure."]
20301    pub max_distance: u16,
20302    #[doc = "Class id of the distance sensor type."]
20303    pub sensor_type: MavDistanceSensor,
20304    #[doc = "Angular width in degrees of each array element. Increment direction is clockwise. This field is ignored if increment_f is non-zero."]
20305    pub increment: u8,
20306    #[doc = "Angular width in degrees of each array element as a float. If non-zero then this value is used instead of the uint8_t increment field. Positive is clockwise direction, negative is counter-clockwise."]
20307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20308    pub increment_f: f32,
20309    #[doc = "Relative angle offset of the 0-index element in the distances array. Value of 0 corresponds to forward. Positive is clockwise direction, negative is counter-clockwise."]
20310    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20311    pub angle_offset: f32,
20312    #[doc = "Coordinate frame of reference for the yaw rotation and offset of the sensor data. Defaults to MAV_FRAME_GLOBAL, which is north aligned. For body-mounted sensors use MAV_FRAME_BODY_FRD, which is vehicle front aligned."]
20313    #[cfg_attr(feature = "serde", serde(default))]
20314    pub frame: MavFrame,
20315}
20316impl OBSTACLE_DISTANCE_DATA {
20317    pub const ENCODED_LEN: usize = 167usize;
20318    pub const DEFAULT: Self = Self {
20319        time_usec: 0_u64,
20320        distances: [0_u16; 72usize],
20321        min_distance: 0_u16,
20322        max_distance: 0_u16,
20323        sensor_type: MavDistanceSensor::DEFAULT,
20324        increment: 0_u8,
20325        increment_f: 0.0_f32,
20326        angle_offset: 0.0_f32,
20327        frame: MavFrame::DEFAULT,
20328    };
20329    #[cfg(feature = "arbitrary")]
20330    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20331        use arbitrary::{Arbitrary, Unstructured};
20332        let mut buf = [0u8; 1024];
20333        rng.fill_bytes(&mut buf);
20334        let mut unstructured = Unstructured::new(&buf);
20335        Self::arbitrary(&mut unstructured).unwrap_or_default()
20336    }
20337}
20338impl Default for OBSTACLE_DISTANCE_DATA {
20339    fn default() -> Self {
20340        Self::DEFAULT.clone()
20341    }
20342}
20343impl MessageData for OBSTACLE_DISTANCE_DATA {
20344    type Message = MavMessage;
20345    const ID: u32 = 330u32;
20346    const NAME: &'static str = "OBSTACLE_DISTANCE";
20347    const EXTRA_CRC: u8 = 23u8;
20348    const ENCODED_LEN: usize = 167usize;
20349    fn deser(
20350        _version: MavlinkVersion,
20351        __input: &[u8],
20352    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20353        let avail_len = __input.len();
20354        let mut payload_buf = [0; Self::ENCODED_LEN];
20355        let mut buf = if avail_len < Self::ENCODED_LEN {
20356            payload_buf[0..avail_len].copy_from_slice(__input);
20357            Bytes::new(&payload_buf)
20358        } else {
20359            Bytes::new(__input)
20360        };
20361        let mut __struct = Self::default();
20362        __struct.time_usec = buf.get_u64_le();
20363        for v in &mut __struct.distances {
20364            let val = buf.get_u16_le();
20365            *v = val;
20366        }
20367        __struct.min_distance = buf.get_u16_le();
20368        __struct.max_distance = buf.get_u16_le();
20369        let tmp = buf.get_u8();
20370        __struct.sensor_type =
20371            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20372                enum_type: "MavDistanceSensor",
20373                value: tmp as u32,
20374            })?;
20375        __struct.increment = buf.get_u8();
20376        __struct.increment_f = buf.get_f32_le();
20377        __struct.angle_offset = buf.get_f32_le();
20378        let tmp = buf.get_u8();
20379        __struct.frame =
20380            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20381                enum_type: "MavFrame",
20382                value: tmp as u32,
20383            })?;
20384        Ok(__struct)
20385    }
20386    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20387        let mut __tmp = BytesMut::new(bytes);
20388        #[allow(clippy::absurd_extreme_comparisons)]
20389        #[allow(unused_comparisons)]
20390        if __tmp.remaining() < Self::ENCODED_LEN {
20391            panic!(
20392                "buffer is too small (need {} bytes, but got {})",
20393                Self::ENCODED_LEN,
20394                __tmp.remaining(),
20395            )
20396        }
20397        __tmp.put_u64_le(self.time_usec);
20398        for val in &self.distances {
20399            __tmp.put_u16_le(*val);
20400        }
20401        __tmp.put_u16_le(self.min_distance);
20402        __tmp.put_u16_le(self.max_distance);
20403        __tmp.put_u8(self.sensor_type as u8);
20404        __tmp.put_u8(self.increment);
20405        __tmp.put_f32_le(self.increment_f);
20406        __tmp.put_f32_le(self.angle_offset);
20407        __tmp.put_u8(self.frame as u8);
20408        if matches!(version, MavlinkVersion::V2) {
20409            let len = __tmp.len();
20410            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20411        } else {
20412            __tmp.len()
20413        }
20414    }
20415}
20416#[doc = "id: 331"]
20417#[doc = "Odometry message to communicate odometry information with an external interface. Fits ROS REP 147 standard for aerial vehicles (<http://www.ros.org/reps/rep-0147.html>)."]
20418#[derive(Debug, Clone, PartialEq)]
20419#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20420#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20421pub struct ODOMETRY_DATA {
20422    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20423    pub time_usec: u64,
20424    #[doc = "X Position"]
20425    pub x: f32,
20426    #[doc = "Y Position"]
20427    pub y: f32,
20428    #[doc = "Z Position"]
20429    pub z: f32,
20430    #[doc = "Quaternion components, w, x, y, z (1 0 0 0 is the null-rotation)"]
20431    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20432    pub q: [f32; 4],
20433    #[doc = "X linear speed"]
20434    pub vx: f32,
20435    #[doc = "Y linear speed"]
20436    pub vy: f32,
20437    #[doc = "Z linear speed"]
20438    pub vz: f32,
20439    #[doc = "Roll angular speed"]
20440    pub rollspeed: f32,
20441    #[doc = "Pitch angular speed"]
20442    pub pitchspeed: f32,
20443    #[doc = "Yaw angular speed"]
20444    pub yawspeed: f32,
20445    #[doc = "Row-major representation of a 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20446    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20447    pub pose_covariance: [f32; 21],
20448    #[doc = "Row-major representation of a 6x6 velocity cross-covariance matrix upper right triangle (states: vx, vy, vz, rollspeed, pitchspeed, yawspeed; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
20449    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20450    pub velocity_covariance: [f32; 21],
20451    #[doc = "Coordinate frame of reference for the pose data."]
20452    pub frame_id: MavFrame,
20453    #[doc = "Coordinate frame of reference for the velocity in free space (twist) data."]
20454    pub child_frame_id: MavFrame,
20455    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
20456    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20457    pub reset_counter: u8,
20458    #[doc = "Type of estimator that is providing the odometry."]
20459    #[cfg_attr(feature = "serde", serde(default))]
20460    pub estimator_type: MavEstimatorType,
20461    #[doc = "Optional odometry quality metric as a percentage. -1 = odometry has failed, 0 = unknown/unset quality, 1 = worst quality, 100 = best quality"]
20462    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
20463    pub quality: i8,
20464}
20465impl ODOMETRY_DATA {
20466    pub const ENCODED_LEN: usize = 233usize;
20467    pub const DEFAULT: Self = Self {
20468        time_usec: 0_u64,
20469        x: 0.0_f32,
20470        y: 0.0_f32,
20471        z: 0.0_f32,
20472        q: [0.0_f32; 4usize],
20473        vx: 0.0_f32,
20474        vy: 0.0_f32,
20475        vz: 0.0_f32,
20476        rollspeed: 0.0_f32,
20477        pitchspeed: 0.0_f32,
20478        yawspeed: 0.0_f32,
20479        pose_covariance: [0.0_f32; 21usize],
20480        velocity_covariance: [0.0_f32; 21usize],
20481        frame_id: MavFrame::DEFAULT,
20482        child_frame_id: MavFrame::DEFAULT,
20483        reset_counter: 0_u8,
20484        estimator_type: MavEstimatorType::DEFAULT,
20485        quality: 0_i8,
20486    };
20487    #[cfg(feature = "arbitrary")]
20488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20489        use arbitrary::{Arbitrary, Unstructured};
20490        let mut buf = [0u8; 1024];
20491        rng.fill_bytes(&mut buf);
20492        let mut unstructured = Unstructured::new(&buf);
20493        Self::arbitrary(&mut unstructured).unwrap_or_default()
20494    }
20495}
20496impl Default for ODOMETRY_DATA {
20497    fn default() -> Self {
20498        Self::DEFAULT.clone()
20499    }
20500}
20501impl MessageData for ODOMETRY_DATA {
20502    type Message = MavMessage;
20503    const ID: u32 = 331u32;
20504    const NAME: &'static str = "ODOMETRY";
20505    const EXTRA_CRC: u8 = 91u8;
20506    const ENCODED_LEN: usize = 233usize;
20507    fn deser(
20508        _version: MavlinkVersion,
20509        __input: &[u8],
20510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20511        let avail_len = __input.len();
20512        let mut payload_buf = [0; Self::ENCODED_LEN];
20513        let mut buf = if avail_len < Self::ENCODED_LEN {
20514            payload_buf[0..avail_len].copy_from_slice(__input);
20515            Bytes::new(&payload_buf)
20516        } else {
20517            Bytes::new(__input)
20518        };
20519        let mut __struct = Self::default();
20520        __struct.time_usec = buf.get_u64_le();
20521        __struct.x = buf.get_f32_le();
20522        __struct.y = buf.get_f32_le();
20523        __struct.z = buf.get_f32_le();
20524        for v in &mut __struct.q {
20525            let val = buf.get_f32_le();
20526            *v = val;
20527        }
20528        __struct.vx = buf.get_f32_le();
20529        __struct.vy = buf.get_f32_le();
20530        __struct.vz = buf.get_f32_le();
20531        __struct.rollspeed = buf.get_f32_le();
20532        __struct.pitchspeed = buf.get_f32_le();
20533        __struct.yawspeed = buf.get_f32_le();
20534        for v in &mut __struct.pose_covariance {
20535            let val = buf.get_f32_le();
20536            *v = val;
20537        }
20538        for v in &mut __struct.velocity_covariance {
20539            let val = buf.get_f32_le();
20540            *v = val;
20541        }
20542        let tmp = buf.get_u8();
20543        __struct.frame_id =
20544            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20545                enum_type: "MavFrame",
20546                value: tmp as u32,
20547            })?;
20548        let tmp = buf.get_u8();
20549        __struct.child_frame_id =
20550            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20551                enum_type: "MavFrame",
20552                value: tmp as u32,
20553            })?;
20554        __struct.reset_counter = buf.get_u8();
20555        let tmp = buf.get_u8();
20556        __struct.estimator_type =
20557            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20558                enum_type: "MavEstimatorType",
20559                value: tmp as u32,
20560            })?;
20561        __struct.quality = buf.get_i8();
20562        Ok(__struct)
20563    }
20564    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20565        let mut __tmp = BytesMut::new(bytes);
20566        #[allow(clippy::absurd_extreme_comparisons)]
20567        #[allow(unused_comparisons)]
20568        if __tmp.remaining() < Self::ENCODED_LEN {
20569            panic!(
20570                "buffer is too small (need {} bytes, but got {})",
20571                Self::ENCODED_LEN,
20572                __tmp.remaining(),
20573            )
20574        }
20575        __tmp.put_u64_le(self.time_usec);
20576        __tmp.put_f32_le(self.x);
20577        __tmp.put_f32_le(self.y);
20578        __tmp.put_f32_le(self.z);
20579        for val in &self.q {
20580            __tmp.put_f32_le(*val);
20581        }
20582        __tmp.put_f32_le(self.vx);
20583        __tmp.put_f32_le(self.vy);
20584        __tmp.put_f32_le(self.vz);
20585        __tmp.put_f32_le(self.rollspeed);
20586        __tmp.put_f32_le(self.pitchspeed);
20587        __tmp.put_f32_le(self.yawspeed);
20588        for val in &self.pose_covariance {
20589            __tmp.put_f32_le(*val);
20590        }
20591        for val in &self.velocity_covariance {
20592            __tmp.put_f32_le(*val);
20593        }
20594        __tmp.put_u8(self.frame_id as u8);
20595        __tmp.put_u8(self.child_frame_id as u8);
20596        __tmp.put_u8(self.reset_counter);
20597        __tmp.put_u8(self.estimator_type as u8);
20598        __tmp.put_i8(self.quality);
20599        if matches!(version, MavlinkVersion::V2) {
20600            let len = __tmp.len();
20601            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20602        } else {
20603            __tmp.len()
20604        }
20605    }
20606}
20607#[doc = "id: 390"]
20608#[doc = "Hardware status sent by an onboard computer."]
20609#[derive(Debug, Clone, PartialEq)]
20610#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20611#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20612pub struct ONBOARD_COMPUTER_STATUS_DATA {
20613    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
20614    pub time_usec: u64,
20615    #[doc = "Time since system boot."]
20616    pub uptime: u32,
20617    #[doc = "Amount of used RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20618    pub ram_usage: u32,
20619    #[doc = "Total amount of RAM on the component system. A value of UINT32_MAX implies the field is unused."]
20620    pub ram_total: u32,
20621    #[doc = "Storage type: 0: HDD, 1: SSD, 2: EMMC, 3: SD card (non-removable), 4: SD card (removable). A value of UINT32_MAX implies the field is unused."]
20622    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20623    pub storage_type: [u32; 4],
20624    #[doc = "Amount of used storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20625    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20626    pub storage_usage: [u32; 4],
20627    #[doc = "Total amount of storage space on the component system. A value of UINT32_MAX implies the field is unused."]
20628    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20629    pub storage_total: [u32; 4],
20630    #[doc = "Link type: 0-9: UART, 10-19: Wired network, 20-29: Wifi, 30-39: Point-to-point proprietary, 40-49: Mesh proprietary"]
20631    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20632    pub link_type: [u32; 6],
20633    #[doc = "Network traffic from the component system. A value of UINT32_MAX implies the field is unused."]
20634    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20635    pub link_tx_rate: [u32; 6],
20636    #[doc = "Network traffic to the component system. A value of UINT32_MAX implies the field is unused."]
20637    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20638    pub link_rx_rate: [u32; 6],
20639    #[doc = "Network capacity from the component system. A value of UINT32_MAX implies the field is unused."]
20640    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20641    pub link_tx_max: [u32; 6],
20642    #[doc = "Network capacity to the component system. A value of UINT32_MAX implies the field is unused."]
20643    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20644    pub link_rx_max: [u32; 6],
20645    #[doc = "Fan speeds. A value of INT16_MAX implies the field is unused."]
20646    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20647    pub fan_speed: [i16; 4],
20648    #[doc = "Type of the onboard computer: 0: Mission computer primary, 1: Mission computer backup 1, 2: Mission computer backup 2, 3: Compute node, 4-5: Compute spares, 6-9: Payload computers."]
20649    pub mavtype: u8,
20650    #[doc = "CPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20651    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20652    pub cpu_cores: [u8; 8],
20653    #[doc = "Combined CPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20654    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20655    pub cpu_combined: [u8; 10],
20656    #[doc = "GPU usage on the component in percent (100 - idle). A value of UINT8_MAX implies the field is unused."]
20657    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20658    pub gpu_cores: [u8; 4],
20659    #[doc = "Combined GPU usage as the last 10 slices of 100 MS (a histogram). This allows to identify spikes in load that max out the system, but only for a short amount of time. A value of UINT8_MAX implies the field is unused."]
20660    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20661    pub gpu_combined: [u8; 10],
20662    #[doc = "Temperature of the board. A value of INT8_MAX implies the field is unused."]
20663    pub temperature_board: i8,
20664    #[doc = "Temperature of the CPU core. A value of INT8_MAX implies the field is unused."]
20665    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20666    pub temperature_core: [i8; 8],
20667}
20668impl ONBOARD_COMPUTER_STATUS_DATA {
20669    pub const ENCODED_LEN: usize = 238usize;
20670    pub const DEFAULT: Self = Self {
20671        time_usec: 0_u64,
20672        uptime: 0_u32,
20673        ram_usage: 0_u32,
20674        ram_total: 0_u32,
20675        storage_type: [0_u32; 4usize],
20676        storage_usage: [0_u32; 4usize],
20677        storage_total: [0_u32; 4usize],
20678        link_type: [0_u32; 6usize],
20679        link_tx_rate: [0_u32; 6usize],
20680        link_rx_rate: [0_u32; 6usize],
20681        link_tx_max: [0_u32; 6usize],
20682        link_rx_max: [0_u32; 6usize],
20683        fan_speed: [0_i16; 4usize],
20684        mavtype: 0_u8,
20685        cpu_cores: [0_u8; 8usize],
20686        cpu_combined: [0_u8; 10usize],
20687        gpu_cores: [0_u8; 4usize],
20688        gpu_combined: [0_u8; 10usize],
20689        temperature_board: 0_i8,
20690        temperature_core: [0_i8; 8usize],
20691    };
20692    #[cfg(feature = "arbitrary")]
20693    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20694        use arbitrary::{Arbitrary, Unstructured};
20695        let mut buf = [0u8; 1024];
20696        rng.fill_bytes(&mut buf);
20697        let mut unstructured = Unstructured::new(&buf);
20698        Self::arbitrary(&mut unstructured).unwrap_or_default()
20699    }
20700}
20701impl Default for ONBOARD_COMPUTER_STATUS_DATA {
20702    fn default() -> Self {
20703        Self::DEFAULT.clone()
20704    }
20705}
20706impl MessageData for ONBOARD_COMPUTER_STATUS_DATA {
20707    type Message = MavMessage;
20708    const ID: u32 = 390u32;
20709    const NAME: &'static str = "ONBOARD_COMPUTER_STATUS";
20710    const EXTRA_CRC: u8 = 156u8;
20711    const ENCODED_LEN: usize = 238usize;
20712    fn deser(
20713        _version: MavlinkVersion,
20714        __input: &[u8],
20715    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20716        let avail_len = __input.len();
20717        let mut payload_buf = [0; Self::ENCODED_LEN];
20718        let mut buf = if avail_len < Self::ENCODED_LEN {
20719            payload_buf[0..avail_len].copy_from_slice(__input);
20720            Bytes::new(&payload_buf)
20721        } else {
20722            Bytes::new(__input)
20723        };
20724        let mut __struct = Self::default();
20725        __struct.time_usec = buf.get_u64_le();
20726        __struct.uptime = buf.get_u32_le();
20727        __struct.ram_usage = buf.get_u32_le();
20728        __struct.ram_total = buf.get_u32_le();
20729        for v in &mut __struct.storage_type {
20730            let val = buf.get_u32_le();
20731            *v = val;
20732        }
20733        for v in &mut __struct.storage_usage {
20734            let val = buf.get_u32_le();
20735            *v = val;
20736        }
20737        for v in &mut __struct.storage_total {
20738            let val = buf.get_u32_le();
20739            *v = val;
20740        }
20741        for v in &mut __struct.link_type {
20742            let val = buf.get_u32_le();
20743            *v = val;
20744        }
20745        for v in &mut __struct.link_tx_rate {
20746            let val = buf.get_u32_le();
20747            *v = val;
20748        }
20749        for v in &mut __struct.link_rx_rate {
20750            let val = buf.get_u32_le();
20751            *v = val;
20752        }
20753        for v in &mut __struct.link_tx_max {
20754            let val = buf.get_u32_le();
20755            *v = val;
20756        }
20757        for v in &mut __struct.link_rx_max {
20758            let val = buf.get_u32_le();
20759            *v = val;
20760        }
20761        for v in &mut __struct.fan_speed {
20762            let val = buf.get_i16_le();
20763            *v = val;
20764        }
20765        __struct.mavtype = buf.get_u8();
20766        for v in &mut __struct.cpu_cores {
20767            let val = buf.get_u8();
20768            *v = val;
20769        }
20770        for v in &mut __struct.cpu_combined {
20771            let val = buf.get_u8();
20772            *v = val;
20773        }
20774        for v in &mut __struct.gpu_cores {
20775            let val = buf.get_u8();
20776            *v = val;
20777        }
20778        for v in &mut __struct.gpu_combined {
20779            let val = buf.get_u8();
20780            *v = val;
20781        }
20782        __struct.temperature_board = buf.get_i8();
20783        for v in &mut __struct.temperature_core {
20784            let val = buf.get_i8();
20785            *v = val;
20786        }
20787        Ok(__struct)
20788    }
20789    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20790        let mut __tmp = BytesMut::new(bytes);
20791        #[allow(clippy::absurd_extreme_comparisons)]
20792        #[allow(unused_comparisons)]
20793        if __tmp.remaining() < Self::ENCODED_LEN {
20794            panic!(
20795                "buffer is too small (need {} bytes, but got {})",
20796                Self::ENCODED_LEN,
20797                __tmp.remaining(),
20798            )
20799        }
20800        __tmp.put_u64_le(self.time_usec);
20801        __tmp.put_u32_le(self.uptime);
20802        __tmp.put_u32_le(self.ram_usage);
20803        __tmp.put_u32_le(self.ram_total);
20804        for val in &self.storage_type {
20805            __tmp.put_u32_le(*val);
20806        }
20807        for val in &self.storage_usage {
20808            __tmp.put_u32_le(*val);
20809        }
20810        for val in &self.storage_total {
20811            __tmp.put_u32_le(*val);
20812        }
20813        for val in &self.link_type {
20814            __tmp.put_u32_le(*val);
20815        }
20816        for val in &self.link_tx_rate {
20817            __tmp.put_u32_le(*val);
20818        }
20819        for val in &self.link_rx_rate {
20820            __tmp.put_u32_le(*val);
20821        }
20822        for val in &self.link_tx_max {
20823            __tmp.put_u32_le(*val);
20824        }
20825        for val in &self.link_rx_max {
20826            __tmp.put_u32_le(*val);
20827        }
20828        for val in &self.fan_speed {
20829            __tmp.put_i16_le(*val);
20830        }
20831        __tmp.put_u8(self.mavtype);
20832        for val in &self.cpu_cores {
20833            __tmp.put_u8(*val);
20834        }
20835        for val in &self.cpu_combined {
20836            __tmp.put_u8(*val);
20837        }
20838        for val in &self.gpu_cores {
20839            __tmp.put_u8(*val);
20840        }
20841        for val in &self.gpu_combined {
20842            __tmp.put_u8(*val);
20843        }
20844        __tmp.put_i8(self.temperature_board);
20845        for val in &self.temperature_core {
20846            __tmp.put_i8(*val);
20847        }
20848        if matches!(version, MavlinkVersion::V2) {
20849            let len = __tmp.len();
20850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20851        } else {
20852            __tmp.len()
20853        }
20854    }
20855}
20856#[doc = "id: 12918"]
20857#[doc = "Transmitter (remote ID system) is enabled and ready to start sending location and other required information. This is streamed by transmitter. A flight controller uses it as a condition to arm."]
20858#[derive(Debug, Clone, PartialEq)]
20859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20861pub struct OPEN_DRONE_ID_ARM_STATUS_DATA {
20862    #[doc = "Status level indicating if arming is allowed."]
20863    pub status: MavOdidArmStatus,
20864    #[doc = "Text error message, should be empty if status is good to arm. Fill with nulls in unused portion."]
20865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20866    pub error: [u8; 50],
20867}
20868impl OPEN_DRONE_ID_ARM_STATUS_DATA {
20869    pub const ENCODED_LEN: usize = 51usize;
20870    pub const DEFAULT: Self = Self {
20871        status: MavOdidArmStatus::DEFAULT,
20872        error: [0_u8; 50usize],
20873    };
20874    #[cfg(feature = "arbitrary")]
20875    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20876        use arbitrary::{Arbitrary, Unstructured};
20877        let mut buf = [0u8; 1024];
20878        rng.fill_bytes(&mut buf);
20879        let mut unstructured = Unstructured::new(&buf);
20880        Self::arbitrary(&mut unstructured).unwrap_or_default()
20881    }
20882}
20883impl Default for OPEN_DRONE_ID_ARM_STATUS_DATA {
20884    fn default() -> Self {
20885        Self::DEFAULT.clone()
20886    }
20887}
20888impl MessageData for OPEN_DRONE_ID_ARM_STATUS_DATA {
20889    type Message = MavMessage;
20890    const ID: u32 = 12918u32;
20891    const NAME: &'static str = "OPEN_DRONE_ID_ARM_STATUS";
20892    const EXTRA_CRC: u8 = 139u8;
20893    const ENCODED_LEN: usize = 51usize;
20894    fn deser(
20895        _version: MavlinkVersion,
20896        __input: &[u8],
20897    ) -> Result<Self, ::mavlink_core::error::ParserError> {
20898        let avail_len = __input.len();
20899        let mut payload_buf = [0; Self::ENCODED_LEN];
20900        let mut buf = if avail_len < Self::ENCODED_LEN {
20901            payload_buf[0..avail_len].copy_from_slice(__input);
20902            Bytes::new(&payload_buf)
20903        } else {
20904            Bytes::new(__input)
20905        };
20906        let mut __struct = Self::default();
20907        let tmp = buf.get_u8();
20908        __struct.status =
20909            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
20910                enum_type: "MavOdidArmStatus",
20911                value: tmp as u32,
20912            })?;
20913        for v in &mut __struct.error {
20914            let val = buf.get_u8();
20915            *v = val;
20916        }
20917        Ok(__struct)
20918    }
20919    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
20920        let mut __tmp = BytesMut::new(bytes);
20921        #[allow(clippy::absurd_extreme_comparisons)]
20922        #[allow(unused_comparisons)]
20923        if __tmp.remaining() < Self::ENCODED_LEN {
20924            panic!(
20925                "buffer is too small (need {} bytes, but got {})",
20926                Self::ENCODED_LEN,
20927                __tmp.remaining(),
20928            )
20929        }
20930        __tmp.put_u8(self.status as u8);
20931        for val in &self.error {
20932            __tmp.put_u8(*val);
20933        }
20934        if matches!(version, MavlinkVersion::V2) {
20935            let len = __tmp.len();
20936            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
20937        } else {
20938            __tmp.len()
20939        }
20940    }
20941}
20942#[doc = "id: 12902"]
20943#[doc = "Data for filling the OpenDroneID Authentication message. The Authentication Message defines a field that can provide a means of authenticity for the identity of the UAS (Unmanned Aircraft System). The Authentication message can have two different formats. For data page 0, the fields PageCount, Length and TimeStamp are present and AuthData is only 17 bytes. For data page 1 through 15, PageCount, Length and TimeStamp are not present and the size of AuthData is 23 bytes."]
20944#[derive(Debug, Clone, PartialEq)]
20945#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
20946#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
20947pub struct OPEN_DRONE_ID_AUTHENTICATION_DATA {
20948    #[doc = "This field is only present for page 0. 32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
20949    pub timestamp: u32,
20950    #[doc = "System ID (0 for broadcast)."]
20951    pub target_system: u8,
20952    #[doc = "Component ID (0 for broadcast)."]
20953    pub target_component: u8,
20954    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
20955    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20956    pub id_or_mac: [u8; 20],
20957    #[doc = "Indicates the type of authentication."]
20958    pub authentication_type: MavOdidAuthType,
20959    #[doc = "Allowed range is 0 - 15."]
20960    pub data_page: u8,
20961    #[doc = "This field is only present for page 0. Allowed range is 0 - 15. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
20962    pub last_page_index: u8,
20963    #[doc = "This field is only present for page 0. Total bytes of authentication_data from all data pages. See the description of struct ODID_Auth_data at <https://github.com/opendroneid/opendroneid-core-c/blob/master/libopendroneid/opendroneid.h>."]
20964    pub length: u8,
20965    #[doc = "Opaque authentication data. For page 0, the size is only 17 bytes. For other pages, the size is 23 bytes. Shall be filled with nulls in the unused portion of the field."]
20966    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
20967    pub authentication_data: [u8; 23],
20968}
20969impl OPEN_DRONE_ID_AUTHENTICATION_DATA {
20970    pub const ENCODED_LEN: usize = 53usize;
20971    pub const DEFAULT: Self = Self {
20972        timestamp: 0_u32,
20973        target_system: 0_u8,
20974        target_component: 0_u8,
20975        id_or_mac: [0_u8; 20usize],
20976        authentication_type: MavOdidAuthType::DEFAULT,
20977        data_page: 0_u8,
20978        last_page_index: 0_u8,
20979        length: 0_u8,
20980        authentication_data: [0_u8; 23usize],
20981    };
20982    #[cfg(feature = "arbitrary")]
20983    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
20984        use arbitrary::{Arbitrary, Unstructured};
20985        let mut buf = [0u8; 1024];
20986        rng.fill_bytes(&mut buf);
20987        let mut unstructured = Unstructured::new(&buf);
20988        Self::arbitrary(&mut unstructured).unwrap_or_default()
20989    }
20990}
20991impl Default for OPEN_DRONE_ID_AUTHENTICATION_DATA {
20992    fn default() -> Self {
20993        Self::DEFAULT.clone()
20994    }
20995}
20996impl MessageData for OPEN_DRONE_ID_AUTHENTICATION_DATA {
20997    type Message = MavMessage;
20998    const ID: u32 = 12902u32;
20999    const NAME: &'static str = "OPEN_DRONE_ID_AUTHENTICATION";
21000    const EXTRA_CRC: u8 = 140u8;
21001    const ENCODED_LEN: usize = 53usize;
21002    fn deser(
21003        _version: MavlinkVersion,
21004        __input: &[u8],
21005    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21006        let avail_len = __input.len();
21007        let mut payload_buf = [0; Self::ENCODED_LEN];
21008        let mut buf = if avail_len < Self::ENCODED_LEN {
21009            payload_buf[0..avail_len].copy_from_slice(__input);
21010            Bytes::new(&payload_buf)
21011        } else {
21012            Bytes::new(__input)
21013        };
21014        let mut __struct = Self::default();
21015        __struct.timestamp = buf.get_u32_le();
21016        __struct.target_system = buf.get_u8();
21017        __struct.target_component = buf.get_u8();
21018        for v in &mut __struct.id_or_mac {
21019            let val = buf.get_u8();
21020            *v = val;
21021        }
21022        let tmp = buf.get_u8();
21023        __struct.authentication_type =
21024            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21025                enum_type: "MavOdidAuthType",
21026                value: tmp as u32,
21027            })?;
21028        __struct.data_page = buf.get_u8();
21029        __struct.last_page_index = buf.get_u8();
21030        __struct.length = buf.get_u8();
21031        for v in &mut __struct.authentication_data {
21032            let val = buf.get_u8();
21033            *v = val;
21034        }
21035        Ok(__struct)
21036    }
21037    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21038        let mut __tmp = BytesMut::new(bytes);
21039        #[allow(clippy::absurd_extreme_comparisons)]
21040        #[allow(unused_comparisons)]
21041        if __tmp.remaining() < Self::ENCODED_LEN {
21042            panic!(
21043                "buffer is too small (need {} bytes, but got {})",
21044                Self::ENCODED_LEN,
21045                __tmp.remaining(),
21046            )
21047        }
21048        __tmp.put_u32_le(self.timestamp);
21049        __tmp.put_u8(self.target_system);
21050        __tmp.put_u8(self.target_component);
21051        for val in &self.id_or_mac {
21052            __tmp.put_u8(*val);
21053        }
21054        __tmp.put_u8(self.authentication_type as u8);
21055        __tmp.put_u8(self.data_page);
21056        __tmp.put_u8(self.last_page_index);
21057        __tmp.put_u8(self.length);
21058        for val in &self.authentication_data {
21059            __tmp.put_u8(*val);
21060        }
21061        if matches!(version, MavlinkVersion::V2) {
21062            let len = __tmp.len();
21063            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21064        } else {
21065            __tmp.len()
21066        }
21067    }
21068}
21069#[doc = "id: 12900"]
21070#[doc = "Data for filling the OpenDroneID Basic ID message. This and the below messages are primarily meant for feeding data to/from an OpenDroneID implementation. E.g. <https://github.com/opendroneid/opendroneid-core-c>. These messages are compatible with the ASTM F3411 Remote ID standard and the ASD-STAN prEN 4709-002 Direct Remote ID standard. Additional information and usage of these messages is documented at <https://mavlink.io/en/services/opendroneid.html>."]
21071#[derive(Debug, Clone, PartialEq)]
21072#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21073#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21074pub struct OPEN_DRONE_ID_BASIC_ID_DATA {
21075    #[doc = "System ID (0 for broadcast)."]
21076    pub target_system: u8,
21077    #[doc = "Component ID (0 for broadcast)."]
21078    pub target_component: u8,
21079    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21080    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21081    pub id_or_mac: [u8; 20],
21082    #[doc = "Indicates the format for the uas_id field of this message."]
21083    pub id_type: MavOdidIdType,
21084    #[doc = "Indicates the type of UA (Unmanned Aircraft)."]
21085    pub ua_type: MavOdidUaType,
21086    #[doc = "UAS (Unmanned Aircraft System) ID following the format specified by id_type. Shall be filled with nulls in the unused portion of the field."]
21087    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21088    pub uas_id: [u8; 20],
21089}
21090impl OPEN_DRONE_ID_BASIC_ID_DATA {
21091    pub const ENCODED_LEN: usize = 44usize;
21092    pub const DEFAULT: Self = Self {
21093        target_system: 0_u8,
21094        target_component: 0_u8,
21095        id_or_mac: [0_u8; 20usize],
21096        id_type: MavOdidIdType::DEFAULT,
21097        ua_type: MavOdidUaType::DEFAULT,
21098        uas_id: [0_u8; 20usize],
21099    };
21100    #[cfg(feature = "arbitrary")]
21101    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21102        use arbitrary::{Arbitrary, Unstructured};
21103        let mut buf = [0u8; 1024];
21104        rng.fill_bytes(&mut buf);
21105        let mut unstructured = Unstructured::new(&buf);
21106        Self::arbitrary(&mut unstructured).unwrap_or_default()
21107    }
21108}
21109impl Default for OPEN_DRONE_ID_BASIC_ID_DATA {
21110    fn default() -> Self {
21111        Self::DEFAULT.clone()
21112    }
21113}
21114impl MessageData for OPEN_DRONE_ID_BASIC_ID_DATA {
21115    type Message = MavMessage;
21116    const ID: u32 = 12900u32;
21117    const NAME: &'static str = "OPEN_DRONE_ID_BASIC_ID";
21118    const EXTRA_CRC: u8 = 114u8;
21119    const ENCODED_LEN: usize = 44usize;
21120    fn deser(
21121        _version: MavlinkVersion,
21122        __input: &[u8],
21123    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21124        let avail_len = __input.len();
21125        let mut payload_buf = [0; Self::ENCODED_LEN];
21126        let mut buf = if avail_len < Self::ENCODED_LEN {
21127            payload_buf[0..avail_len].copy_from_slice(__input);
21128            Bytes::new(&payload_buf)
21129        } else {
21130            Bytes::new(__input)
21131        };
21132        let mut __struct = Self::default();
21133        __struct.target_system = buf.get_u8();
21134        __struct.target_component = buf.get_u8();
21135        for v in &mut __struct.id_or_mac {
21136            let val = buf.get_u8();
21137            *v = val;
21138        }
21139        let tmp = buf.get_u8();
21140        __struct.id_type =
21141            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21142                enum_type: "MavOdidIdType",
21143                value: tmp as u32,
21144            })?;
21145        let tmp = buf.get_u8();
21146        __struct.ua_type =
21147            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21148                enum_type: "MavOdidUaType",
21149                value: tmp as u32,
21150            })?;
21151        for v in &mut __struct.uas_id {
21152            let val = buf.get_u8();
21153            *v = val;
21154        }
21155        Ok(__struct)
21156    }
21157    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21158        let mut __tmp = BytesMut::new(bytes);
21159        #[allow(clippy::absurd_extreme_comparisons)]
21160        #[allow(unused_comparisons)]
21161        if __tmp.remaining() < Self::ENCODED_LEN {
21162            panic!(
21163                "buffer is too small (need {} bytes, but got {})",
21164                Self::ENCODED_LEN,
21165                __tmp.remaining(),
21166            )
21167        }
21168        __tmp.put_u8(self.target_system);
21169        __tmp.put_u8(self.target_component);
21170        for val in &self.id_or_mac {
21171            __tmp.put_u8(*val);
21172        }
21173        __tmp.put_u8(self.id_type as u8);
21174        __tmp.put_u8(self.ua_type as u8);
21175        for val in &self.uas_id {
21176            __tmp.put_u8(*val);
21177        }
21178        if matches!(version, MavlinkVersion::V2) {
21179            let len = __tmp.len();
21180            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21181        } else {
21182            __tmp.len()
21183        }
21184    }
21185}
21186#[doc = "id: 12901"]
21187#[doc = "Data for filling the OpenDroneID Location message. The float data types are 32-bit IEEE 754. The Location message provides the location, altitude, direction and speed of the aircraft."]
21188#[derive(Debug, Clone, PartialEq)]
21189#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21190#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21191pub struct OPEN_DRONE_ID_LOCATION_DATA {
21192    #[doc = "Current latitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21193    pub latitude: i32,
21194    #[doc = "Current longitude of the unmanned aircraft. If unknown: 0 (both Lat/Lon)."]
21195    pub longitude: i32,
21196    #[doc = "The altitude calculated from the barometric pressue. Reference is against 29.92inHg or 1013.2mb. If unknown: -1000 m."]
21197    pub altitude_barometric: f32,
21198    #[doc = "The geodetic altitude as defined by WGS84. If unknown: -1000 m."]
21199    pub altitude_geodetic: f32,
21200    #[doc = "The current height of the unmanned aircraft above the take-off location or the ground as indicated by height_reference. If unknown: -1000 m."]
21201    pub height: f32,
21202    #[doc = "Seconds after the full hour with reference to UTC time. Typically the GPS outputs a time-of-week value in milliseconds. First convert that to UTC and then convert for this field using ((float) (time_week_ms % (60*60*1000))) / 1000. If unknown: 0xFFFF."]
21203    pub timestamp: f32,
21204    #[doc = "Direction over ground (not heading, but direction of movement) measured clockwise from true North: 0 - 35999 centi-degrees. If unknown: 36100 centi-degrees."]
21205    pub direction: u16,
21206    #[doc = "Ground speed. Positive only. If unknown: 25500 cm/s. If speed is larger than 25425 cm/s, use 25425 cm/s."]
21207    pub speed_horizontal: u16,
21208    #[doc = "The vertical speed. Up is positive. If unknown: 6300 cm/s. If speed is larger than 6200 cm/s, use 6200 cm/s. If lower than -6200 cm/s, use -6200 cm/s."]
21209    pub speed_vertical: i16,
21210    #[doc = "System ID (0 for broadcast)."]
21211    pub target_system: u8,
21212    #[doc = "Component ID (0 for broadcast)."]
21213    pub target_component: u8,
21214    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21215    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21216    pub id_or_mac: [u8; 20],
21217    #[doc = "Indicates whether the unmanned aircraft is on the ground or in the air."]
21218    pub status: MavOdidStatus,
21219    #[doc = "Indicates the reference point for the height field."]
21220    pub height_reference: MavOdidHeightRef,
21221    #[doc = "The accuracy of the horizontal position."]
21222    pub horizontal_accuracy: MavOdidHorAcc,
21223    #[doc = "The accuracy of the vertical position."]
21224    pub vertical_accuracy: MavOdidVerAcc,
21225    #[doc = "The accuracy of the barometric altitude."]
21226    pub barometer_accuracy: MavOdidVerAcc,
21227    #[doc = "The accuracy of the horizontal and vertical speed."]
21228    pub speed_accuracy: MavOdidSpeedAcc,
21229    #[doc = "The accuracy of the timestamps."]
21230    pub timestamp_accuracy: MavOdidTimeAcc,
21231}
21232impl OPEN_DRONE_ID_LOCATION_DATA {
21233    pub const ENCODED_LEN: usize = 59usize;
21234    pub const DEFAULT: Self = Self {
21235        latitude: 0_i32,
21236        longitude: 0_i32,
21237        altitude_barometric: 0.0_f32,
21238        altitude_geodetic: 0.0_f32,
21239        height: 0.0_f32,
21240        timestamp: 0.0_f32,
21241        direction: 0_u16,
21242        speed_horizontal: 0_u16,
21243        speed_vertical: 0_i16,
21244        target_system: 0_u8,
21245        target_component: 0_u8,
21246        id_or_mac: [0_u8; 20usize],
21247        status: MavOdidStatus::DEFAULT,
21248        height_reference: MavOdidHeightRef::DEFAULT,
21249        horizontal_accuracy: MavOdidHorAcc::DEFAULT,
21250        vertical_accuracy: MavOdidVerAcc::DEFAULT,
21251        barometer_accuracy: MavOdidVerAcc::DEFAULT,
21252        speed_accuracy: MavOdidSpeedAcc::DEFAULT,
21253        timestamp_accuracy: MavOdidTimeAcc::DEFAULT,
21254    };
21255    #[cfg(feature = "arbitrary")]
21256    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21257        use arbitrary::{Arbitrary, Unstructured};
21258        let mut buf = [0u8; 1024];
21259        rng.fill_bytes(&mut buf);
21260        let mut unstructured = Unstructured::new(&buf);
21261        Self::arbitrary(&mut unstructured).unwrap_or_default()
21262    }
21263}
21264impl Default for OPEN_DRONE_ID_LOCATION_DATA {
21265    fn default() -> Self {
21266        Self::DEFAULT.clone()
21267    }
21268}
21269impl MessageData for OPEN_DRONE_ID_LOCATION_DATA {
21270    type Message = MavMessage;
21271    const ID: u32 = 12901u32;
21272    const NAME: &'static str = "OPEN_DRONE_ID_LOCATION";
21273    const EXTRA_CRC: u8 = 254u8;
21274    const ENCODED_LEN: usize = 59usize;
21275    fn deser(
21276        _version: MavlinkVersion,
21277        __input: &[u8],
21278    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21279        let avail_len = __input.len();
21280        let mut payload_buf = [0; Self::ENCODED_LEN];
21281        let mut buf = if avail_len < Self::ENCODED_LEN {
21282            payload_buf[0..avail_len].copy_from_slice(__input);
21283            Bytes::new(&payload_buf)
21284        } else {
21285            Bytes::new(__input)
21286        };
21287        let mut __struct = Self::default();
21288        __struct.latitude = buf.get_i32_le();
21289        __struct.longitude = buf.get_i32_le();
21290        __struct.altitude_barometric = buf.get_f32_le();
21291        __struct.altitude_geodetic = buf.get_f32_le();
21292        __struct.height = buf.get_f32_le();
21293        __struct.timestamp = buf.get_f32_le();
21294        __struct.direction = buf.get_u16_le();
21295        __struct.speed_horizontal = buf.get_u16_le();
21296        __struct.speed_vertical = buf.get_i16_le();
21297        __struct.target_system = buf.get_u8();
21298        __struct.target_component = buf.get_u8();
21299        for v in &mut __struct.id_or_mac {
21300            let val = buf.get_u8();
21301            *v = val;
21302        }
21303        let tmp = buf.get_u8();
21304        __struct.status =
21305            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21306                enum_type: "MavOdidStatus",
21307                value: tmp as u32,
21308            })?;
21309        let tmp = buf.get_u8();
21310        __struct.height_reference =
21311            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21312                enum_type: "MavOdidHeightRef",
21313                value: tmp as u32,
21314            })?;
21315        let tmp = buf.get_u8();
21316        __struct.horizontal_accuracy =
21317            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21318                enum_type: "MavOdidHorAcc",
21319                value: tmp as u32,
21320            })?;
21321        let tmp = buf.get_u8();
21322        __struct.vertical_accuracy =
21323            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21324                enum_type: "MavOdidVerAcc",
21325                value: tmp as u32,
21326            })?;
21327        let tmp = buf.get_u8();
21328        __struct.barometer_accuracy =
21329            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21330                enum_type: "MavOdidVerAcc",
21331                value: tmp as u32,
21332            })?;
21333        let tmp = buf.get_u8();
21334        __struct.speed_accuracy =
21335            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21336                enum_type: "MavOdidSpeedAcc",
21337                value: tmp as u32,
21338            })?;
21339        let tmp = buf.get_u8();
21340        __struct.timestamp_accuracy =
21341            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21342                enum_type: "MavOdidTimeAcc",
21343                value: tmp as u32,
21344            })?;
21345        Ok(__struct)
21346    }
21347    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21348        let mut __tmp = BytesMut::new(bytes);
21349        #[allow(clippy::absurd_extreme_comparisons)]
21350        #[allow(unused_comparisons)]
21351        if __tmp.remaining() < Self::ENCODED_LEN {
21352            panic!(
21353                "buffer is too small (need {} bytes, but got {})",
21354                Self::ENCODED_LEN,
21355                __tmp.remaining(),
21356            )
21357        }
21358        __tmp.put_i32_le(self.latitude);
21359        __tmp.put_i32_le(self.longitude);
21360        __tmp.put_f32_le(self.altitude_barometric);
21361        __tmp.put_f32_le(self.altitude_geodetic);
21362        __tmp.put_f32_le(self.height);
21363        __tmp.put_f32_le(self.timestamp);
21364        __tmp.put_u16_le(self.direction);
21365        __tmp.put_u16_le(self.speed_horizontal);
21366        __tmp.put_i16_le(self.speed_vertical);
21367        __tmp.put_u8(self.target_system);
21368        __tmp.put_u8(self.target_component);
21369        for val in &self.id_or_mac {
21370            __tmp.put_u8(*val);
21371        }
21372        __tmp.put_u8(self.status as u8);
21373        __tmp.put_u8(self.height_reference as u8);
21374        __tmp.put_u8(self.horizontal_accuracy as u8);
21375        __tmp.put_u8(self.vertical_accuracy as u8);
21376        __tmp.put_u8(self.barometer_accuracy as u8);
21377        __tmp.put_u8(self.speed_accuracy as u8);
21378        __tmp.put_u8(self.timestamp_accuracy as u8);
21379        if matches!(version, MavlinkVersion::V2) {
21380            let len = __tmp.len();
21381            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21382        } else {
21383            __tmp.len()
21384        }
21385    }
21386}
21387#[doc = "id: 12915"]
21388#[doc = "An OpenDroneID message pack is a container for multiple encoded OpenDroneID messages (i.e. not in the format given for the above message descriptions but after encoding into the compressed OpenDroneID byte format). Used e.g. when transmitting on Bluetooth 5.0 Long Range/Extended Advertising or on WiFi Neighbor Aware Networking or on WiFi Beacon."]
21389#[derive(Debug, Clone, PartialEq)]
21390#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21391#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21392pub struct OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21393    #[doc = "System ID (0 for broadcast)."]
21394    pub target_system: u8,
21395    #[doc = "Component ID (0 for broadcast)."]
21396    pub target_component: u8,
21397    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21398    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21399    pub id_or_mac: [u8; 20],
21400    #[doc = "This field must currently always be equal to 25 (bytes), since all encoded OpenDroneID messages are specified to have this length."]
21401    pub single_message_size: u8,
21402    #[doc = "Number of encoded messages in the pack (not the number of bytes). Allowed range is 1 - 9."]
21403    pub msg_pack_size: u8,
21404    #[doc = "Concatenation of encoded OpenDroneID messages. Shall be filled with nulls in the unused portion of the field."]
21405    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21406    pub messages: [u8; 225],
21407}
21408impl OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21409    pub const ENCODED_LEN: usize = 249usize;
21410    pub const DEFAULT: Self = Self {
21411        target_system: 0_u8,
21412        target_component: 0_u8,
21413        id_or_mac: [0_u8; 20usize],
21414        single_message_size: 0_u8,
21415        msg_pack_size: 0_u8,
21416        messages: [0_u8; 225usize],
21417    };
21418    #[cfg(feature = "arbitrary")]
21419    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21420        use arbitrary::{Arbitrary, Unstructured};
21421        let mut buf = [0u8; 1024];
21422        rng.fill_bytes(&mut buf);
21423        let mut unstructured = Unstructured::new(&buf);
21424        Self::arbitrary(&mut unstructured).unwrap_or_default()
21425    }
21426}
21427impl Default for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21428    fn default() -> Self {
21429        Self::DEFAULT.clone()
21430    }
21431}
21432impl MessageData for OPEN_DRONE_ID_MESSAGE_PACK_DATA {
21433    type Message = MavMessage;
21434    const ID: u32 = 12915u32;
21435    const NAME: &'static str = "OPEN_DRONE_ID_MESSAGE_PACK";
21436    const EXTRA_CRC: u8 = 94u8;
21437    const ENCODED_LEN: usize = 249usize;
21438    fn deser(
21439        _version: MavlinkVersion,
21440        __input: &[u8],
21441    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21442        let avail_len = __input.len();
21443        let mut payload_buf = [0; Self::ENCODED_LEN];
21444        let mut buf = if avail_len < Self::ENCODED_LEN {
21445            payload_buf[0..avail_len].copy_from_slice(__input);
21446            Bytes::new(&payload_buf)
21447        } else {
21448            Bytes::new(__input)
21449        };
21450        let mut __struct = Self::default();
21451        __struct.target_system = buf.get_u8();
21452        __struct.target_component = buf.get_u8();
21453        for v in &mut __struct.id_or_mac {
21454            let val = buf.get_u8();
21455            *v = val;
21456        }
21457        __struct.single_message_size = buf.get_u8();
21458        __struct.msg_pack_size = buf.get_u8();
21459        for v in &mut __struct.messages {
21460            let val = buf.get_u8();
21461            *v = val;
21462        }
21463        Ok(__struct)
21464    }
21465    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21466        let mut __tmp = BytesMut::new(bytes);
21467        #[allow(clippy::absurd_extreme_comparisons)]
21468        #[allow(unused_comparisons)]
21469        if __tmp.remaining() < Self::ENCODED_LEN {
21470            panic!(
21471                "buffer is too small (need {} bytes, but got {})",
21472                Self::ENCODED_LEN,
21473                __tmp.remaining(),
21474            )
21475        }
21476        __tmp.put_u8(self.target_system);
21477        __tmp.put_u8(self.target_component);
21478        for val in &self.id_or_mac {
21479            __tmp.put_u8(*val);
21480        }
21481        __tmp.put_u8(self.single_message_size);
21482        __tmp.put_u8(self.msg_pack_size);
21483        for val in &self.messages {
21484            __tmp.put_u8(*val);
21485        }
21486        if matches!(version, MavlinkVersion::V2) {
21487            let len = __tmp.len();
21488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21489        } else {
21490            __tmp.len()
21491        }
21492    }
21493}
21494#[doc = "id: 12905"]
21495#[doc = "Data for filling the OpenDroneID Operator ID message, which contains the CAA (Civil Aviation Authority) issued operator ID."]
21496#[derive(Debug, Clone, PartialEq)]
21497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21499pub struct OPEN_DRONE_ID_OPERATOR_ID_DATA {
21500    #[doc = "System ID (0 for broadcast)."]
21501    pub target_system: u8,
21502    #[doc = "Component ID (0 for broadcast)."]
21503    pub target_component: u8,
21504    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21505    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21506    pub id_or_mac: [u8; 20],
21507    #[doc = "Indicates the type of the operator_id field."]
21508    pub operator_id_type: MavOdidOperatorIdType,
21509    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21510    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21511    pub operator_id: [u8; 20],
21512}
21513impl OPEN_DRONE_ID_OPERATOR_ID_DATA {
21514    pub const ENCODED_LEN: usize = 43usize;
21515    pub const DEFAULT: Self = Self {
21516        target_system: 0_u8,
21517        target_component: 0_u8,
21518        id_or_mac: [0_u8; 20usize],
21519        operator_id_type: MavOdidOperatorIdType::DEFAULT,
21520        operator_id: [0_u8; 20usize],
21521    };
21522    #[cfg(feature = "arbitrary")]
21523    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21524        use arbitrary::{Arbitrary, Unstructured};
21525        let mut buf = [0u8; 1024];
21526        rng.fill_bytes(&mut buf);
21527        let mut unstructured = Unstructured::new(&buf);
21528        Self::arbitrary(&mut unstructured).unwrap_or_default()
21529    }
21530}
21531impl Default for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21532    fn default() -> Self {
21533        Self::DEFAULT.clone()
21534    }
21535}
21536impl MessageData for OPEN_DRONE_ID_OPERATOR_ID_DATA {
21537    type Message = MavMessage;
21538    const ID: u32 = 12905u32;
21539    const NAME: &'static str = "OPEN_DRONE_ID_OPERATOR_ID";
21540    const EXTRA_CRC: u8 = 49u8;
21541    const ENCODED_LEN: usize = 43usize;
21542    fn deser(
21543        _version: MavlinkVersion,
21544        __input: &[u8],
21545    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21546        let avail_len = __input.len();
21547        let mut payload_buf = [0; Self::ENCODED_LEN];
21548        let mut buf = if avail_len < Self::ENCODED_LEN {
21549            payload_buf[0..avail_len].copy_from_slice(__input);
21550            Bytes::new(&payload_buf)
21551        } else {
21552            Bytes::new(__input)
21553        };
21554        let mut __struct = Self::default();
21555        __struct.target_system = buf.get_u8();
21556        __struct.target_component = buf.get_u8();
21557        for v in &mut __struct.id_or_mac {
21558            let val = buf.get_u8();
21559            *v = val;
21560        }
21561        let tmp = buf.get_u8();
21562        __struct.operator_id_type =
21563            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21564                enum_type: "MavOdidOperatorIdType",
21565                value: tmp as u32,
21566            })?;
21567        for v in &mut __struct.operator_id {
21568            let val = buf.get_u8();
21569            *v = val;
21570        }
21571        Ok(__struct)
21572    }
21573    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21574        let mut __tmp = BytesMut::new(bytes);
21575        #[allow(clippy::absurd_extreme_comparisons)]
21576        #[allow(unused_comparisons)]
21577        if __tmp.remaining() < Self::ENCODED_LEN {
21578            panic!(
21579                "buffer is too small (need {} bytes, but got {})",
21580                Self::ENCODED_LEN,
21581                __tmp.remaining(),
21582            )
21583        }
21584        __tmp.put_u8(self.target_system);
21585        __tmp.put_u8(self.target_component);
21586        for val in &self.id_or_mac {
21587            __tmp.put_u8(*val);
21588        }
21589        __tmp.put_u8(self.operator_id_type as u8);
21590        for val in &self.operator_id {
21591            __tmp.put_u8(*val);
21592        }
21593        if matches!(version, MavlinkVersion::V2) {
21594            let len = __tmp.len();
21595            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21596        } else {
21597            __tmp.len()
21598        }
21599    }
21600}
21601#[doc = "id: 12903"]
21602#[doc = "Data for filling the OpenDroneID Self ID message. The Self ID Message is an opportunity for the operator to (optionally) declare their identity and purpose of the flight. This message can provide additional information that could reduce the threat profile of a UA (Unmanned Aircraft) flying in a particular area or manner. This message can also be used to provide optional additional clarification in an emergency/remote ID system failure situation."]
21603#[derive(Debug, Clone, PartialEq)]
21604#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21605#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21606pub struct OPEN_DRONE_ID_SELF_ID_DATA {
21607    #[doc = "System ID (0 for broadcast)."]
21608    pub target_system: u8,
21609    #[doc = "Component ID (0 for broadcast)."]
21610    pub target_component: u8,
21611    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21612    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21613    pub id_or_mac: [u8; 20],
21614    #[doc = "Indicates the type of the description field."]
21615    pub description_type: MavOdidDescType,
21616    #[doc = "Text description or numeric value expressed as ASCII characters. Shall be filled with nulls in the unused portion of the field."]
21617    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21618    pub description: [u8; 23],
21619}
21620impl OPEN_DRONE_ID_SELF_ID_DATA {
21621    pub const ENCODED_LEN: usize = 46usize;
21622    pub const DEFAULT: Self = Self {
21623        target_system: 0_u8,
21624        target_component: 0_u8,
21625        id_or_mac: [0_u8; 20usize],
21626        description_type: MavOdidDescType::DEFAULT,
21627        description: [0_u8; 23usize],
21628    };
21629    #[cfg(feature = "arbitrary")]
21630    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21631        use arbitrary::{Arbitrary, Unstructured};
21632        let mut buf = [0u8; 1024];
21633        rng.fill_bytes(&mut buf);
21634        let mut unstructured = Unstructured::new(&buf);
21635        Self::arbitrary(&mut unstructured).unwrap_or_default()
21636    }
21637}
21638impl Default for OPEN_DRONE_ID_SELF_ID_DATA {
21639    fn default() -> Self {
21640        Self::DEFAULT.clone()
21641    }
21642}
21643impl MessageData for OPEN_DRONE_ID_SELF_ID_DATA {
21644    type Message = MavMessage;
21645    const ID: u32 = 12903u32;
21646    const NAME: &'static str = "OPEN_DRONE_ID_SELF_ID";
21647    const EXTRA_CRC: u8 = 249u8;
21648    const ENCODED_LEN: usize = 46usize;
21649    fn deser(
21650        _version: MavlinkVersion,
21651        __input: &[u8],
21652    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21653        let avail_len = __input.len();
21654        let mut payload_buf = [0; Self::ENCODED_LEN];
21655        let mut buf = if avail_len < Self::ENCODED_LEN {
21656            payload_buf[0..avail_len].copy_from_slice(__input);
21657            Bytes::new(&payload_buf)
21658        } else {
21659            Bytes::new(__input)
21660        };
21661        let mut __struct = Self::default();
21662        __struct.target_system = buf.get_u8();
21663        __struct.target_component = buf.get_u8();
21664        for v in &mut __struct.id_or_mac {
21665            let val = buf.get_u8();
21666            *v = val;
21667        }
21668        let tmp = buf.get_u8();
21669        __struct.description_type =
21670            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21671                enum_type: "MavOdidDescType",
21672                value: tmp as u32,
21673            })?;
21674        for v in &mut __struct.description {
21675            let val = buf.get_u8();
21676            *v = val;
21677        }
21678        Ok(__struct)
21679    }
21680    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21681        let mut __tmp = BytesMut::new(bytes);
21682        #[allow(clippy::absurd_extreme_comparisons)]
21683        #[allow(unused_comparisons)]
21684        if __tmp.remaining() < Self::ENCODED_LEN {
21685            panic!(
21686                "buffer is too small (need {} bytes, but got {})",
21687                Self::ENCODED_LEN,
21688                __tmp.remaining(),
21689            )
21690        }
21691        __tmp.put_u8(self.target_system);
21692        __tmp.put_u8(self.target_component);
21693        for val in &self.id_or_mac {
21694            __tmp.put_u8(*val);
21695        }
21696        __tmp.put_u8(self.description_type as u8);
21697        for val in &self.description {
21698            __tmp.put_u8(*val);
21699        }
21700        if matches!(version, MavlinkVersion::V2) {
21701            let len = __tmp.len();
21702            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21703        } else {
21704            __tmp.len()
21705        }
21706    }
21707}
21708#[doc = "id: 12904"]
21709#[doc = "Data for filling the OpenDroneID System message. The System Message contains general system information including the operator location/altitude and possible aircraft group and/or category/class information."]
21710#[derive(Debug, Clone, PartialEq)]
21711#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21712#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21713pub struct OPEN_DRONE_ID_SYSTEM_DATA {
21714    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21715    pub operator_latitude: i32,
21716    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21717    pub operator_longitude: i32,
21718    #[doc = "Area Operations Ceiling relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21719    pub area_ceiling: f32,
21720    #[doc = "Area Operations Floor relative to WGS84. If unknown: -1000 m. Used only for swarms/multiple UA."]
21721    pub area_floor: f32,
21722    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21723    pub operator_altitude_geo: f32,
21724    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21725    pub timestamp: u32,
21726    #[doc = "Number of aircraft in the area, group or formation (default 1). Used only for swarms/multiple UA."]
21727    pub area_count: u16,
21728    #[doc = "Radius of the cylindrical area of the group or formation (default 0). Used only for swarms/multiple UA."]
21729    pub area_radius: u16,
21730    #[doc = "System ID (0 for broadcast)."]
21731    pub target_system: u8,
21732    #[doc = "Component ID (0 for broadcast)."]
21733    pub target_component: u8,
21734    #[doc = "Only used for drone ID data received from other UAs. See detailed description at <https://mavlink.io/en/services/opendroneid.html>."]
21735    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
21736    pub id_or_mac: [u8; 20],
21737    #[doc = "Specifies the operator location type."]
21738    pub operator_location_type: MavOdidOperatorLocationType,
21739    #[doc = "Specifies the classification type of the UA."]
21740    pub classification_type: MavOdidClassificationType,
21741    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the category of the UA."]
21742    pub category_eu: MavOdidCategoryEu,
21743    #[doc = "When classification_type is MAV_ODID_CLASSIFICATION_TYPE_EU, specifies the class of the UA."]
21744    pub class_eu: MavOdidClassEu,
21745}
21746impl OPEN_DRONE_ID_SYSTEM_DATA {
21747    pub const ENCODED_LEN: usize = 54usize;
21748    pub const DEFAULT: Self = Self {
21749        operator_latitude: 0_i32,
21750        operator_longitude: 0_i32,
21751        area_ceiling: 0.0_f32,
21752        area_floor: 0.0_f32,
21753        operator_altitude_geo: 0.0_f32,
21754        timestamp: 0_u32,
21755        area_count: 0_u16,
21756        area_radius: 0_u16,
21757        target_system: 0_u8,
21758        target_component: 0_u8,
21759        id_or_mac: [0_u8; 20usize],
21760        operator_location_type: MavOdidOperatorLocationType::DEFAULT,
21761        classification_type: MavOdidClassificationType::DEFAULT,
21762        category_eu: MavOdidCategoryEu::DEFAULT,
21763        class_eu: MavOdidClassEu::DEFAULT,
21764    };
21765    #[cfg(feature = "arbitrary")]
21766    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21767        use arbitrary::{Arbitrary, Unstructured};
21768        let mut buf = [0u8; 1024];
21769        rng.fill_bytes(&mut buf);
21770        let mut unstructured = Unstructured::new(&buf);
21771        Self::arbitrary(&mut unstructured).unwrap_or_default()
21772    }
21773}
21774impl Default for OPEN_DRONE_ID_SYSTEM_DATA {
21775    fn default() -> Self {
21776        Self::DEFAULT.clone()
21777    }
21778}
21779impl MessageData for OPEN_DRONE_ID_SYSTEM_DATA {
21780    type Message = MavMessage;
21781    const ID: u32 = 12904u32;
21782    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM";
21783    const EXTRA_CRC: u8 = 77u8;
21784    const ENCODED_LEN: usize = 54usize;
21785    fn deser(
21786        _version: MavlinkVersion,
21787        __input: &[u8],
21788    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21789        let avail_len = __input.len();
21790        let mut payload_buf = [0; Self::ENCODED_LEN];
21791        let mut buf = if avail_len < Self::ENCODED_LEN {
21792            payload_buf[0..avail_len].copy_from_slice(__input);
21793            Bytes::new(&payload_buf)
21794        } else {
21795            Bytes::new(__input)
21796        };
21797        let mut __struct = Self::default();
21798        __struct.operator_latitude = buf.get_i32_le();
21799        __struct.operator_longitude = buf.get_i32_le();
21800        __struct.area_ceiling = buf.get_f32_le();
21801        __struct.area_floor = buf.get_f32_le();
21802        __struct.operator_altitude_geo = buf.get_f32_le();
21803        __struct.timestamp = buf.get_u32_le();
21804        __struct.area_count = buf.get_u16_le();
21805        __struct.area_radius = buf.get_u16_le();
21806        __struct.target_system = buf.get_u8();
21807        __struct.target_component = buf.get_u8();
21808        for v in &mut __struct.id_or_mac {
21809            let val = buf.get_u8();
21810            *v = val;
21811        }
21812        let tmp = buf.get_u8();
21813        __struct.operator_location_type =
21814            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21815                enum_type: "MavOdidOperatorLocationType",
21816                value: tmp as u32,
21817            })?;
21818        let tmp = buf.get_u8();
21819        __struct.classification_type =
21820            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21821                enum_type: "MavOdidClassificationType",
21822                value: tmp as u32,
21823            })?;
21824        let tmp = buf.get_u8();
21825        __struct.category_eu =
21826            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21827                enum_type: "MavOdidCategoryEu",
21828                value: tmp as u32,
21829            })?;
21830        let tmp = buf.get_u8();
21831        __struct.class_eu =
21832            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
21833                enum_type: "MavOdidClassEu",
21834                value: tmp as u32,
21835            })?;
21836        Ok(__struct)
21837    }
21838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21839        let mut __tmp = BytesMut::new(bytes);
21840        #[allow(clippy::absurd_extreme_comparisons)]
21841        #[allow(unused_comparisons)]
21842        if __tmp.remaining() < Self::ENCODED_LEN {
21843            panic!(
21844                "buffer is too small (need {} bytes, but got {})",
21845                Self::ENCODED_LEN,
21846                __tmp.remaining(),
21847            )
21848        }
21849        __tmp.put_i32_le(self.operator_latitude);
21850        __tmp.put_i32_le(self.operator_longitude);
21851        __tmp.put_f32_le(self.area_ceiling);
21852        __tmp.put_f32_le(self.area_floor);
21853        __tmp.put_f32_le(self.operator_altitude_geo);
21854        __tmp.put_u32_le(self.timestamp);
21855        __tmp.put_u16_le(self.area_count);
21856        __tmp.put_u16_le(self.area_radius);
21857        __tmp.put_u8(self.target_system);
21858        __tmp.put_u8(self.target_component);
21859        for val in &self.id_or_mac {
21860            __tmp.put_u8(*val);
21861        }
21862        __tmp.put_u8(self.operator_location_type as u8);
21863        __tmp.put_u8(self.classification_type as u8);
21864        __tmp.put_u8(self.category_eu as u8);
21865        __tmp.put_u8(self.class_eu as u8);
21866        if matches!(version, MavlinkVersion::V2) {
21867            let len = __tmp.len();
21868            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21869        } else {
21870            __tmp.len()
21871        }
21872    }
21873}
21874#[doc = "id: 12919"]
21875#[doc = "Update the data in the OPEN_DRONE_ID_SYSTEM message with new location information. This can be sent to update the location information for the operator when no other information in the SYSTEM message has changed. This message allows for efficient operation on radio links which have limited uplink bandwidth while meeting requirements for update frequency of the operator location."]
21876#[derive(Debug, Clone, PartialEq)]
21877#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21878#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21879pub struct OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21880    #[doc = "Latitude of the operator. If unknown: 0 (both Lat/Lon)."]
21881    pub operator_latitude: i32,
21882    #[doc = "Longitude of the operator. If unknown: 0 (both Lat/Lon)."]
21883    pub operator_longitude: i32,
21884    #[doc = "Geodetic altitude of the operator relative to WGS84. If unknown: -1000 m."]
21885    pub operator_altitude_geo: f32,
21886    #[doc = "32 bit Unix Timestamp in seconds since 00:00:00 01/01/2019."]
21887    pub timestamp: u32,
21888    #[doc = "System ID (0 for broadcast)."]
21889    pub target_system: u8,
21890    #[doc = "Component ID (0 for broadcast)."]
21891    pub target_component: u8,
21892}
21893impl OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21894    pub const ENCODED_LEN: usize = 18usize;
21895    pub const DEFAULT: Self = Self {
21896        operator_latitude: 0_i32,
21897        operator_longitude: 0_i32,
21898        operator_altitude_geo: 0.0_f32,
21899        timestamp: 0_u32,
21900        target_system: 0_u8,
21901        target_component: 0_u8,
21902    };
21903    #[cfg(feature = "arbitrary")]
21904    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
21905        use arbitrary::{Arbitrary, Unstructured};
21906        let mut buf = [0u8; 1024];
21907        rng.fill_bytes(&mut buf);
21908        let mut unstructured = Unstructured::new(&buf);
21909        Self::arbitrary(&mut unstructured).unwrap_or_default()
21910    }
21911}
21912impl Default for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21913    fn default() -> Self {
21914        Self::DEFAULT.clone()
21915    }
21916}
21917impl MessageData for OPEN_DRONE_ID_SYSTEM_UPDATE_DATA {
21918    type Message = MavMessage;
21919    const ID: u32 = 12919u32;
21920    const NAME: &'static str = "OPEN_DRONE_ID_SYSTEM_UPDATE";
21921    const EXTRA_CRC: u8 = 7u8;
21922    const ENCODED_LEN: usize = 18usize;
21923    fn deser(
21924        _version: MavlinkVersion,
21925        __input: &[u8],
21926    ) -> Result<Self, ::mavlink_core::error::ParserError> {
21927        let avail_len = __input.len();
21928        let mut payload_buf = [0; Self::ENCODED_LEN];
21929        let mut buf = if avail_len < Self::ENCODED_LEN {
21930            payload_buf[0..avail_len].copy_from_slice(__input);
21931            Bytes::new(&payload_buf)
21932        } else {
21933            Bytes::new(__input)
21934        };
21935        let mut __struct = Self::default();
21936        __struct.operator_latitude = buf.get_i32_le();
21937        __struct.operator_longitude = buf.get_i32_le();
21938        __struct.operator_altitude_geo = buf.get_f32_le();
21939        __struct.timestamp = buf.get_u32_le();
21940        __struct.target_system = buf.get_u8();
21941        __struct.target_component = buf.get_u8();
21942        Ok(__struct)
21943    }
21944    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
21945        let mut __tmp = BytesMut::new(bytes);
21946        #[allow(clippy::absurd_extreme_comparisons)]
21947        #[allow(unused_comparisons)]
21948        if __tmp.remaining() < Self::ENCODED_LEN {
21949            panic!(
21950                "buffer is too small (need {} bytes, but got {})",
21951                Self::ENCODED_LEN,
21952                __tmp.remaining(),
21953            )
21954        }
21955        __tmp.put_i32_le(self.operator_latitude);
21956        __tmp.put_i32_le(self.operator_longitude);
21957        __tmp.put_f32_le(self.operator_altitude_geo);
21958        __tmp.put_u32_le(self.timestamp);
21959        __tmp.put_u8(self.target_system);
21960        __tmp.put_u8(self.target_component);
21961        if matches!(version, MavlinkVersion::V2) {
21962            let len = __tmp.len();
21963            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
21964        } else {
21965            __tmp.len()
21966        }
21967    }
21968}
21969#[doc = "id: 100"]
21970#[doc = "Optical flow from a flow sensor (e.g. optical mouse sensor)."]
21971#[derive(Debug, Clone, PartialEq)]
21972#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
21973#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
21974pub struct OPTICAL_FLOW_DATA {
21975    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
21976    pub time_usec: u64,
21977    #[doc = "Flow in x-sensor direction, angular-speed compensated"]
21978    pub flow_comp_m_x: f32,
21979    #[doc = "Flow in y-sensor direction, angular-speed compensated"]
21980    pub flow_comp_m_y: f32,
21981    #[doc = "Ground distance. Positive value: distance known. Negative value: Unknown distance"]
21982    pub ground_distance: f32,
21983    #[doc = "Flow in x-sensor direction"]
21984    pub flow_x: i16,
21985    #[doc = "Flow in y-sensor direction"]
21986    pub flow_y: i16,
21987    #[doc = "Sensor ID"]
21988    pub sensor_id: u8,
21989    #[doc = "Optical flow quality / confidence. 0: bad, 255: maximum quality"]
21990    pub quality: u8,
21991    #[doc = "Flow rate about X axis"]
21992    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21993    pub flow_rate_x: f32,
21994    #[doc = "Flow rate about Y axis"]
21995    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
21996    pub flow_rate_y: f32,
21997}
21998impl OPTICAL_FLOW_DATA {
21999    pub const ENCODED_LEN: usize = 34usize;
22000    pub const DEFAULT: Self = Self {
22001        time_usec: 0_u64,
22002        flow_comp_m_x: 0.0_f32,
22003        flow_comp_m_y: 0.0_f32,
22004        ground_distance: 0.0_f32,
22005        flow_x: 0_i16,
22006        flow_y: 0_i16,
22007        sensor_id: 0_u8,
22008        quality: 0_u8,
22009        flow_rate_x: 0.0_f32,
22010        flow_rate_y: 0.0_f32,
22011    };
22012    #[cfg(feature = "arbitrary")]
22013    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22014        use arbitrary::{Arbitrary, Unstructured};
22015        let mut buf = [0u8; 1024];
22016        rng.fill_bytes(&mut buf);
22017        let mut unstructured = Unstructured::new(&buf);
22018        Self::arbitrary(&mut unstructured).unwrap_or_default()
22019    }
22020}
22021impl Default for OPTICAL_FLOW_DATA {
22022    fn default() -> Self {
22023        Self::DEFAULT.clone()
22024    }
22025}
22026impl MessageData for OPTICAL_FLOW_DATA {
22027    type Message = MavMessage;
22028    const ID: u32 = 100u32;
22029    const NAME: &'static str = "OPTICAL_FLOW";
22030    const EXTRA_CRC: u8 = 175u8;
22031    const ENCODED_LEN: usize = 34usize;
22032    fn deser(
22033        _version: MavlinkVersion,
22034        __input: &[u8],
22035    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22036        let avail_len = __input.len();
22037        let mut payload_buf = [0; Self::ENCODED_LEN];
22038        let mut buf = if avail_len < Self::ENCODED_LEN {
22039            payload_buf[0..avail_len].copy_from_slice(__input);
22040            Bytes::new(&payload_buf)
22041        } else {
22042            Bytes::new(__input)
22043        };
22044        let mut __struct = Self::default();
22045        __struct.time_usec = buf.get_u64_le();
22046        __struct.flow_comp_m_x = buf.get_f32_le();
22047        __struct.flow_comp_m_y = buf.get_f32_le();
22048        __struct.ground_distance = buf.get_f32_le();
22049        __struct.flow_x = buf.get_i16_le();
22050        __struct.flow_y = buf.get_i16_le();
22051        __struct.sensor_id = buf.get_u8();
22052        __struct.quality = buf.get_u8();
22053        __struct.flow_rate_x = buf.get_f32_le();
22054        __struct.flow_rate_y = buf.get_f32_le();
22055        Ok(__struct)
22056    }
22057    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22058        let mut __tmp = BytesMut::new(bytes);
22059        #[allow(clippy::absurd_extreme_comparisons)]
22060        #[allow(unused_comparisons)]
22061        if __tmp.remaining() < Self::ENCODED_LEN {
22062            panic!(
22063                "buffer is too small (need {} bytes, but got {})",
22064                Self::ENCODED_LEN,
22065                __tmp.remaining(),
22066            )
22067        }
22068        __tmp.put_u64_le(self.time_usec);
22069        __tmp.put_f32_le(self.flow_comp_m_x);
22070        __tmp.put_f32_le(self.flow_comp_m_y);
22071        __tmp.put_f32_le(self.ground_distance);
22072        __tmp.put_i16_le(self.flow_x);
22073        __tmp.put_i16_le(self.flow_y);
22074        __tmp.put_u8(self.sensor_id);
22075        __tmp.put_u8(self.quality);
22076        __tmp.put_f32_le(self.flow_rate_x);
22077        __tmp.put_f32_le(self.flow_rate_y);
22078        if matches!(version, MavlinkVersion::V2) {
22079            let len = __tmp.len();
22080            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22081        } else {
22082            __tmp.len()
22083        }
22084    }
22085}
22086#[doc = "id: 106"]
22087#[doc = "Optical flow from an angular rate flow sensor (e.g. PX4FLOW or mouse sensor)."]
22088#[derive(Debug, Clone, PartialEq)]
22089#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22090#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22091pub struct OPTICAL_FLOW_RAD_DATA {
22092    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22093    pub time_usec: u64,
22094    #[doc = "Integration time. Divide integrated_x and integrated_y by the integration time to obtain average flow. The integration time also indicates the."]
22095    pub integration_time_us: u32,
22096    #[doc = "Flow around X axis (Sensor RH rotation about the X axis induces a positive flow. Sensor linear motion along the positive Y axis induces a negative flow.)"]
22097    pub integrated_x: f32,
22098    #[doc = "Flow around Y axis (Sensor RH rotation about the Y axis induces a positive flow. Sensor linear motion along the positive X axis induces a positive flow.)"]
22099    pub integrated_y: f32,
22100    #[doc = "RH rotation around X axis"]
22101    pub integrated_xgyro: f32,
22102    #[doc = "RH rotation around Y axis"]
22103    pub integrated_ygyro: f32,
22104    #[doc = "RH rotation around Z axis"]
22105    pub integrated_zgyro: f32,
22106    #[doc = "Time since the distance was sampled."]
22107    pub time_delta_distance_us: u32,
22108    #[doc = "Distance to the center of the flow field. Positive value (including zero): distance known. Negative value: Unknown distance."]
22109    pub distance: f32,
22110    #[doc = "Temperature"]
22111    pub temperature: i16,
22112    #[doc = "Sensor ID"]
22113    pub sensor_id: u8,
22114    #[doc = "Optical flow quality / confidence. 0: no valid flow, 255: maximum quality"]
22115    pub quality: u8,
22116}
22117impl OPTICAL_FLOW_RAD_DATA {
22118    pub const ENCODED_LEN: usize = 44usize;
22119    pub const DEFAULT: Self = Self {
22120        time_usec: 0_u64,
22121        integration_time_us: 0_u32,
22122        integrated_x: 0.0_f32,
22123        integrated_y: 0.0_f32,
22124        integrated_xgyro: 0.0_f32,
22125        integrated_ygyro: 0.0_f32,
22126        integrated_zgyro: 0.0_f32,
22127        time_delta_distance_us: 0_u32,
22128        distance: 0.0_f32,
22129        temperature: 0_i16,
22130        sensor_id: 0_u8,
22131        quality: 0_u8,
22132    };
22133    #[cfg(feature = "arbitrary")]
22134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22135        use arbitrary::{Arbitrary, Unstructured};
22136        let mut buf = [0u8; 1024];
22137        rng.fill_bytes(&mut buf);
22138        let mut unstructured = Unstructured::new(&buf);
22139        Self::arbitrary(&mut unstructured).unwrap_or_default()
22140    }
22141}
22142impl Default for OPTICAL_FLOW_RAD_DATA {
22143    fn default() -> Self {
22144        Self::DEFAULT.clone()
22145    }
22146}
22147impl MessageData for OPTICAL_FLOW_RAD_DATA {
22148    type Message = MavMessage;
22149    const ID: u32 = 106u32;
22150    const NAME: &'static str = "OPTICAL_FLOW_RAD";
22151    const EXTRA_CRC: u8 = 138u8;
22152    const ENCODED_LEN: usize = 44usize;
22153    fn deser(
22154        _version: MavlinkVersion,
22155        __input: &[u8],
22156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22157        let avail_len = __input.len();
22158        let mut payload_buf = [0; Self::ENCODED_LEN];
22159        let mut buf = if avail_len < Self::ENCODED_LEN {
22160            payload_buf[0..avail_len].copy_from_slice(__input);
22161            Bytes::new(&payload_buf)
22162        } else {
22163            Bytes::new(__input)
22164        };
22165        let mut __struct = Self::default();
22166        __struct.time_usec = buf.get_u64_le();
22167        __struct.integration_time_us = buf.get_u32_le();
22168        __struct.integrated_x = buf.get_f32_le();
22169        __struct.integrated_y = buf.get_f32_le();
22170        __struct.integrated_xgyro = buf.get_f32_le();
22171        __struct.integrated_ygyro = buf.get_f32_le();
22172        __struct.integrated_zgyro = buf.get_f32_le();
22173        __struct.time_delta_distance_us = buf.get_u32_le();
22174        __struct.distance = buf.get_f32_le();
22175        __struct.temperature = buf.get_i16_le();
22176        __struct.sensor_id = buf.get_u8();
22177        __struct.quality = buf.get_u8();
22178        Ok(__struct)
22179    }
22180    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22181        let mut __tmp = BytesMut::new(bytes);
22182        #[allow(clippy::absurd_extreme_comparisons)]
22183        #[allow(unused_comparisons)]
22184        if __tmp.remaining() < Self::ENCODED_LEN {
22185            panic!(
22186                "buffer is too small (need {} bytes, but got {})",
22187                Self::ENCODED_LEN,
22188                __tmp.remaining(),
22189            )
22190        }
22191        __tmp.put_u64_le(self.time_usec);
22192        __tmp.put_u32_le(self.integration_time_us);
22193        __tmp.put_f32_le(self.integrated_x);
22194        __tmp.put_f32_le(self.integrated_y);
22195        __tmp.put_f32_le(self.integrated_xgyro);
22196        __tmp.put_f32_le(self.integrated_ygyro);
22197        __tmp.put_f32_le(self.integrated_zgyro);
22198        __tmp.put_u32_le(self.time_delta_distance_us);
22199        __tmp.put_f32_le(self.distance);
22200        __tmp.put_i16_le(self.temperature);
22201        __tmp.put_u8(self.sensor_id);
22202        __tmp.put_u8(self.quality);
22203        if matches!(version, MavlinkVersion::V2) {
22204            let len = __tmp.len();
22205            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22206        } else {
22207            __tmp.len()
22208        }
22209    }
22210}
22211#[doc = "id: 360"]
22212#[doc = "Vehicle status report that is sent out while orbit execution is in progress (see MAV_CMD_DO_ORBIT)."]
22213#[derive(Debug, Clone, PartialEq)]
22214#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22215#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22216pub struct ORBIT_EXECUTION_STATUS_DATA {
22217    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
22218    pub time_usec: u64,
22219    #[doc = "Radius of the orbit circle. Positive values orbit clockwise, negative values orbit counter-clockwise."]
22220    pub radius: f32,
22221    #[doc = "X coordinate of center point. Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22222    pub x: i32,
22223    #[doc = "Y coordinate of center point.  Coordinate system depends on frame field: local = x position in meters * 1e4, global = latitude in degrees * 1e7."]
22224    pub y: i32,
22225    #[doc = "Altitude of center point. Coordinate system depends on frame field."]
22226    pub z: f32,
22227    #[doc = "The coordinate system of the fields: x, y, z."]
22228    pub frame: MavFrame,
22229}
22230impl ORBIT_EXECUTION_STATUS_DATA {
22231    pub const ENCODED_LEN: usize = 25usize;
22232    pub const DEFAULT: Self = Self {
22233        time_usec: 0_u64,
22234        radius: 0.0_f32,
22235        x: 0_i32,
22236        y: 0_i32,
22237        z: 0.0_f32,
22238        frame: MavFrame::DEFAULT,
22239    };
22240    #[cfg(feature = "arbitrary")]
22241    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22242        use arbitrary::{Arbitrary, Unstructured};
22243        let mut buf = [0u8; 1024];
22244        rng.fill_bytes(&mut buf);
22245        let mut unstructured = Unstructured::new(&buf);
22246        Self::arbitrary(&mut unstructured).unwrap_or_default()
22247    }
22248}
22249impl Default for ORBIT_EXECUTION_STATUS_DATA {
22250    fn default() -> Self {
22251        Self::DEFAULT.clone()
22252    }
22253}
22254impl MessageData for ORBIT_EXECUTION_STATUS_DATA {
22255    type Message = MavMessage;
22256    const ID: u32 = 360u32;
22257    const NAME: &'static str = "ORBIT_EXECUTION_STATUS";
22258    const EXTRA_CRC: u8 = 11u8;
22259    const ENCODED_LEN: usize = 25usize;
22260    fn deser(
22261        _version: MavlinkVersion,
22262        __input: &[u8],
22263    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22264        let avail_len = __input.len();
22265        let mut payload_buf = [0; Self::ENCODED_LEN];
22266        let mut buf = if avail_len < Self::ENCODED_LEN {
22267            payload_buf[0..avail_len].copy_from_slice(__input);
22268            Bytes::new(&payload_buf)
22269        } else {
22270            Bytes::new(__input)
22271        };
22272        let mut __struct = Self::default();
22273        __struct.time_usec = buf.get_u64_le();
22274        __struct.radius = buf.get_f32_le();
22275        __struct.x = buf.get_i32_le();
22276        __struct.y = buf.get_i32_le();
22277        __struct.z = buf.get_f32_le();
22278        let tmp = buf.get_u8();
22279        __struct.frame =
22280            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22281                enum_type: "MavFrame",
22282                value: tmp as u32,
22283            })?;
22284        Ok(__struct)
22285    }
22286    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22287        let mut __tmp = BytesMut::new(bytes);
22288        #[allow(clippy::absurd_extreme_comparisons)]
22289        #[allow(unused_comparisons)]
22290        if __tmp.remaining() < Self::ENCODED_LEN {
22291            panic!(
22292                "buffer is too small (need {} bytes, but got {})",
22293                Self::ENCODED_LEN,
22294                __tmp.remaining(),
22295            )
22296        }
22297        __tmp.put_u64_le(self.time_usec);
22298        __tmp.put_f32_le(self.radius);
22299        __tmp.put_i32_le(self.x);
22300        __tmp.put_i32_le(self.y);
22301        __tmp.put_f32_le(self.z);
22302        __tmp.put_u8(self.frame as u8);
22303        if matches!(version, MavlinkVersion::V2) {
22304            let len = __tmp.len();
22305            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22306        } else {
22307            __tmp.len()
22308        }
22309    }
22310}
22311#[doc = "id: 324"]
22312#[doc = "Response from a PARAM_EXT_SET message."]
22313#[derive(Debug, Clone, PartialEq)]
22314#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22315#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22316pub struct PARAM_EXT_ACK_DATA {
22317    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22318    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22319    pub param_id: [u8; 16],
22320    #[doc = "Parameter value (new value if PARAM_ACK_ACCEPTED, current value otherwise)"]
22321    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22322    pub param_value: [u8; 128],
22323    #[doc = "Parameter type."]
22324    pub param_type: MavParamExtType,
22325    #[doc = "Result code."]
22326    pub param_result: ParamAck,
22327}
22328impl PARAM_EXT_ACK_DATA {
22329    pub const ENCODED_LEN: usize = 146usize;
22330    pub const DEFAULT: Self = Self {
22331        param_id: [0_u8; 16usize],
22332        param_value: [0_u8; 128usize],
22333        param_type: MavParamExtType::DEFAULT,
22334        param_result: ParamAck::DEFAULT,
22335    };
22336    #[cfg(feature = "arbitrary")]
22337    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22338        use arbitrary::{Arbitrary, Unstructured};
22339        let mut buf = [0u8; 1024];
22340        rng.fill_bytes(&mut buf);
22341        let mut unstructured = Unstructured::new(&buf);
22342        Self::arbitrary(&mut unstructured).unwrap_or_default()
22343    }
22344}
22345impl Default for PARAM_EXT_ACK_DATA {
22346    fn default() -> Self {
22347        Self::DEFAULT.clone()
22348    }
22349}
22350impl MessageData for PARAM_EXT_ACK_DATA {
22351    type Message = MavMessage;
22352    const ID: u32 = 324u32;
22353    const NAME: &'static str = "PARAM_EXT_ACK";
22354    const EXTRA_CRC: u8 = 132u8;
22355    const ENCODED_LEN: usize = 146usize;
22356    fn deser(
22357        _version: MavlinkVersion,
22358        __input: &[u8],
22359    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22360        let avail_len = __input.len();
22361        let mut payload_buf = [0; Self::ENCODED_LEN];
22362        let mut buf = if avail_len < Self::ENCODED_LEN {
22363            payload_buf[0..avail_len].copy_from_slice(__input);
22364            Bytes::new(&payload_buf)
22365        } else {
22366            Bytes::new(__input)
22367        };
22368        let mut __struct = Self::default();
22369        for v in &mut __struct.param_id {
22370            let val = buf.get_u8();
22371            *v = val;
22372        }
22373        for v in &mut __struct.param_value {
22374            let val = buf.get_u8();
22375            *v = val;
22376        }
22377        let tmp = buf.get_u8();
22378        __struct.param_type =
22379            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22380                enum_type: "MavParamExtType",
22381                value: tmp as u32,
22382            })?;
22383        let tmp = buf.get_u8();
22384        __struct.param_result =
22385            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22386                enum_type: "ParamAck",
22387                value: tmp as u32,
22388            })?;
22389        Ok(__struct)
22390    }
22391    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22392        let mut __tmp = BytesMut::new(bytes);
22393        #[allow(clippy::absurd_extreme_comparisons)]
22394        #[allow(unused_comparisons)]
22395        if __tmp.remaining() < Self::ENCODED_LEN {
22396            panic!(
22397                "buffer is too small (need {} bytes, but got {})",
22398                Self::ENCODED_LEN,
22399                __tmp.remaining(),
22400            )
22401        }
22402        for val in &self.param_id {
22403            __tmp.put_u8(*val);
22404        }
22405        for val in &self.param_value {
22406            __tmp.put_u8(*val);
22407        }
22408        __tmp.put_u8(self.param_type as u8);
22409        __tmp.put_u8(self.param_result as u8);
22410        if matches!(version, MavlinkVersion::V2) {
22411            let len = __tmp.len();
22412            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22413        } else {
22414            __tmp.len()
22415        }
22416    }
22417}
22418#[doc = "id: 321"]
22419#[doc = "Request all parameters of this component. All parameters should be emitted in response as PARAM_EXT_VALUE."]
22420#[derive(Debug, Clone, PartialEq)]
22421#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22422#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22423pub struct PARAM_EXT_REQUEST_LIST_DATA {
22424    #[doc = "System ID"]
22425    pub target_system: u8,
22426    #[doc = "Component ID"]
22427    pub target_component: u8,
22428}
22429impl PARAM_EXT_REQUEST_LIST_DATA {
22430    pub const ENCODED_LEN: usize = 2usize;
22431    pub const DEFAULT: Self = Self {
22432        target_system: 0_u8,
22433        target_component: 0_u8,
22434    };
22435    #[cfg(feature = "arbitrary")]
22436    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22437        use arbitrary::{Arbitrary, Unstructured};
22438        let mut buf = [0u8; 1024];
22439        rng.fill_bytes(&mut buf);
22440        let mut unstructured = Unstructured::new(&buf);
22441        Self::arbitrary(&mut unstructured).unwrap_or_default()
22442    }
22443}
22444impl Default for PARAM_EXT_REQUEST_LIST_DATA {
22445    fn default() -> Self {
22446        Self::DEFAULT.clone()
22447    }
22448}
22449impl MessageData for PARAM_EXT_REQUEST_LIST_DATA {
22450    type Message = MavMessage;
22451    const ID: u32 = 321u32;
22452    const NAME: &'static str = "PARAM_EXT_REQUEST_LIST";
22453    const EXTRA_CRC: u8 = 88u8;
22454    const ENCODED_LEN: usize = 2usize;
22455    fn deser(
22456        _version: MavlinkVersion,
22457        __input: &[u8],
22458    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22459        let avail_len = __input.len();
22460        let mut payload_buf = [0; Self::ENCODED_LEN];
22461        let mut buf = if avail_len < Self::ENCODED_LEN {
22462            payload_buf[0..avail_len].copy_from_slice(__input);
22463            Bytes::new(&payload_buf)
22464        } else {
22465            Bytes::new(__input)
22466        };
22467        let mut __struct = Self::default();
22468        __struct.target_system = buf.get_u8();
22469        __struct.target_component = buf.get_u8();
22470        Ok(__struct)
22471    }
22472    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22473        let mut __tmp = BytesMut::new(bytes);
22474        #[allow(clippy::absurd_extreme_comparisons)]
22475        #[allow(unused_comparisons)]
22476        if __tmp.remaining() < Self::ENCODED_LEN {
22477            panic!(
22478                "buffer is too small (need {} bytes, but got {})",
22479                Self::ENCODED_LEN,
22480                __tmp.remaining(),
22481            )
22482        }
22483        __tmp.put_u8(self.target_system);
22484        __tmp.put_u8(self.target_component);
22485        if matches!(version, MavlinkVersion::V2) {
22486            let len = __tmp.len();
22487            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22488        } else {
22489            __tmp.len()
22490        }
22491    }
22492}
22493#[doc = "id: 320"]
22494#[doc = "Request to read the value of a parameter with either the param_id string id or param_index. PARAM_EXT_VALUE should be emitted in response."]
22495#[derive(Debug, Clone, PartialEq)]
22496#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22497#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22498pub struct PARAM_EXT_REQUEST_READ_DATA {
22499    #[doc = "Parameter index. Set to -1 to use the Parameter ID field as identifier (else param_id will be ignored)"]
22500    pub param_index: i16,
22501    #[doc = "System ID"]
22502    pub target_system: u8,
22503    #[doc = "Component ID"]
22504    pub target_component: u8,
22505    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22506    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22507    pub param_id: [u8; 16],
22508}
22509impl PARAM_EXT_REQUEST_READ_DATA {
22510    pub const ENCODED_LEN: usize = 20usize;
22511    pub const DEFAULT: Self = Self {
22512        param_index: 0_i16,
22513        target_system: 0_u8,
22514        target_component: 0_u8,
22515        param_id: [0_u8; 16usize],
22516    };
22517    #[cfg(feature = "arbitrary")]
22518    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22519        use arbitrary::{Arbitrary, Unstructured};
22520        let mut buf = [0u8; 1024];
22521        rng.fill_bytes(&mut buf);
22522        let mut unstructured = Unstructured::new(&buf);
22523        Self::arbitrary(&mut unstructured).unwrap_or_default()
22524    }
22525}
22526impl Default for PARAM_EXT_REQUEST_READ_DATA {
22527    fn default() -> Self {
22528        Self::DEFAULT.clone()
22529    }
22530}
22531impl MessageData for PARAM_EXT_REQUEST_READ_DATA {
22532    type Message = MavMessage;
22533    const ID: u32 = 320u32;
22534    const NAME: &'static str = "PARAM_EXT_REQUEST_READ";
22535    const EXTRA_CRC: u8 = 243u8;
22536    const ENCODED_LEN: usize = 20usize;
22537    fn deser(
22538        _version: MavlinkVersion,
22539        __input: &[u8],
22540    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22541        let avail_len = __input.len();
22542        let mut payload_buf = [0; Self::ENCODED_LEN];
22543        let mut buf = if avail_len < Self::ENCODED_LEN {
22544            payload_buf[0..avail_len].copy_from_slice(__input);
22545            Bytes::new(&payload_buf)
22546        } else {
22547            Bytes::new(__input)
22548        };
22549        let mut __struct = Self::default();
22550        __struct.param_index = buf.get_i16_le();
22551        __struct.target_system = buf.get_u8();
22552        __struct.target_component = buf.get_u8();
22553        for v in &mut __struct.param_id {
22554            let val = buf.get_u8();
22555            *v = val;
22556        }
22557        Ok(__struct)
22558    }
22559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22560        let mut __tmp = BytesMut::new(bytes);
22561        #[allow(clippy::absurd_extreme_comparisons)]
22562        #[allow(unused_comparisons)]
22563        if __tmp.remaining() < Self::ENCODED_LEN {
22564            panic!(
22565                "buffer is too small (need {} bytes, but got {})",
22566                Self::ENCODED_LEN,
22567                __tmp.remaining(),
22568            )
22569        }
22570        __tmp.put_i16_le(self.param_index);
22571        __tmp.put_u8(self.target_system);
22572        __tmp.put_u8(self.target_component);
22573        for val in &self.param_id {
22574            __tmp.put_u8(*val);
22575        }
22576        if matches!(version, MavlinkVersion::V2) {
22577            let len = __tmp.len();
22578            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22579        } else {
22580            __tmp.len()
22581        }
22582    }
22583}
22584#[doc = "id: 323"]
22585#[doc = "Set a parameter value. In order to deal with message loss (and retransmission of PARAM_EXT_SET), when setting a parameter value and the new value is the same as the current value, you will immediately get a PARAM_ACK_ACCEPTED response. If the current state is PARAM_ACK_IN_PROGRESS, you will accordingly receive a PARAM_ACK_IN_PROGRESS in response."]
22586#[derive(Debug, Clone, PartialEq)]
22587#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22588#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22589pub struct PARAM_EXT_SET_DATA {
22590    #[doc = "System ID"]
22591    pub target_system: u8,
22592    #[doc = "Component ID"]
22593    pub target_component: u8,
22594    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22595    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22596    pub param_id: [u8; 16],
22597    #[doc = "Parameter value"]
22598    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22599    pub param_value: [u8; 128],
22600    #[doc = "Parameter type."]
22601    pub param_type: MavParamExtType,
22602}
22603impl PARAM_EXT_SET_DATA {
22604    pub const ENCODED_LEN: usize = 147usize;
22605    pub const DEFAULT: Self = Self {
22606        target_system: 0_u8,
22607        target_component: 0_u8,
22608        param_id: [0_u8; 16usize],
22609        param_value: [0_u8; 128usize],
22610        param_type: MavParamExtType::DEFAULT,
22611    };
22612    #[cfg(feature = "arbitrary")]
22613    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22614        use arbitrary::{Arbitrary, Unstructured};
22615        let mut buf = [0u8; 1024];
22616        rng.fill_bytes(&mut buf);
22617        let mut unstructured = Unstructured::new(&buf);
22618        Self::arbitrary(&mut unstructured).unwrap_or_default()
22619    }
22620}
22621impl Default for PARAM_EXT_SET_DATA {
22622    fn default() -> Self {
22623        Self::DEFAULT.clone()
22624    }
22625}
22626impl MessageData for PARAM_EXT_SET_DATA {
22627    type Message = MavMessage;
22628    const ID: u32 = 323u32;
22629    const NAME: &'static str = "PARAM_EXT_SET";
22630    const EXTRA_CRC: u8 = 78u8;
22631    const ENCODED_LEN: usize = 147usize;
22632    fn deser(
22633        _version: MavlinkVersion,
22634        __input: &[u8],
22635    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22636        let avail_len = __input.len();
22637        let mut payload_buf = [0; Self::ENCODED_LEN];
22638        let mut buf = if avail_len < Self::ENCODED_LEN {
22639            payload_buf[0..avail_len].copy_from_slice(__input);
22640            Bytes::new(&payload_buf)
22641        } else {
22642            Bytes::new(__input)
22643        };
22644        let mut __struct = Self::default();
22645        __struct.target_system = buf.get_u8();
22646        __struct.target_component = buf.get_u8();
22647        for v in &mut __struct.param_id {
22648            let val = buf.get_u8();
22649            *v = val;
22650        }
22651        for v in &mut __struct.param_value {
22652            let val = buf.get_u8();
22653            *v = val;
22654        }
22655        let tmp = buf.get_u8();
22656        __struct.param_type =
22657            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22658                enum_type: "MavParamExtType",
22659                value: tmp as u32,
22660            })?;
22661        Ok(__struct)
22662    }
22663    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22664        let mut __tmp = BytesMut::new(bytes);
22665        #[allow(clippy::absurd_extreme_comparisons)]
22666        #[allow(unused_comparisons)]
22667        if __tmp.remaining() < Self::ENCODED_LEN {
22668            panic!(
22669                "buffer is too small (need {} bytes, but got {})",
22670                Self::ENCODED_LEN,
22671                __tmp.remaining(),
22672            )
22673        }
22674        __tmp.put_u8(self.target_system);
22675        __tmp.put_u8(self.target_component);
22676        for val in &self.param_id {
22677            __tmp.put_u8(*val);
22678        }
22679        for val in &self.param_value {
22680            __tmp.put_u8(*val);
22681        }
22682        __tmp.put_u8(self.param_type as u8);
22683        if matches!(version, MavlinkVersion::V2) {
22684            let len = __tmp.len();
22685            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22686        } else {
22687            __tmp.len()
22688        }
22689    }
22690}
22691#[doc = "id: 322"]
22692#[doc = "Emit the value of a parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows them to re-request missing parameters after a loss or timeout."]
22693#[derive(Debug, Clone, PartialEq)]
22694#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22695#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22696pub struct PARAM_EXT_VALUE_DATA {
22697    #[doc = "Total number of parameters"]
22698    pub param_count: u16,
22699    #[doc = "Index of this parameter"]
22700    pub param_index: u16,
22701    #[doc = "Parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22702    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22703    pub param_id: [u8; 16],
22704    #[doc = "Parameter value"]
22705    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22706    pub param_value: [u8; 128],
22707    #[doc = "Parameter type."]
22708    pub param_type: MavParamExtType,
22709}
22710impl PARAM_EXT_VALUE_DATA {
22711    pub const ENCODED_LEN: usize = 149usize;
22712    pub const DEFAULT: Self = Self {
22713        param_count: 0_u16,
22714        param_index: 0_u16,
22715        param_id: [0_u8; 16usize],
22716        param_value: [0_u8; 128usize],
22717        param_type: MavParamExtType::DEFAULT,
22718    };
22719    #[cfg(feature = "arbitrary")]
22720    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22721        use arbitrary::{Arbitrary, Unstructured};
22722        let mut buf = [0u8; 1024];
22723        rng.fill_bytes(&mut buf);
22724        let mut unstructured = Unstructured::new(&buf);
22725        Self::arbitrary(&mut unstructured).unwrap_or_default()
22726    }
22727}
22728impl Default for PARAM_EXT_VALUE_DATA {
22729    fn default() -> Self {
22730        Self::DEFAULT.clone()
22731    }
22732}
22733impl MessageData for PARAM_EXT_VALUE_DATA {
22734    type Message = MavMessage;
22735    const ID: u32 = 322u32;
22736    const NAME: &'static str = "PARAM_EXT_VALUE";
22737    const EXTRA_CRC: u8 = 243u8;
22738    const ENCODED_LEN: usize = 149usize;
22739    fn deser(
22740        _version: MavlinkVersion,
22741        __input: &[u8],
22742    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22743        let avail_len = __input.len();
22744        let mut payload_buf = [0; Self::ENCODED_LEN];
22745        let mut buf = if avail_len < Self::ENCODED_LEN {
22746            payload_buf[0..avail_len].copy_from_slice(__input);
22747            Bytes::new(&payload_buf)
22748        } else {
22749            Bytes::new(__input)
22750        };
22751        let mut __struct = Self::default();
22752        __struct.param_count = buf.get_u16_le();
22753        __struct.param_index = buf.get_u16_le();
22754        for v in &mut __struct.param_id {
22755            let val = buf.get_u8();
22756            *v = val;
22757        }
22758        for v in &mut __struct.param_value {
22759            let val = buf.get_u8();
22760            *v = val;
22761        }
22762        let tmp = buf.get_u8();
22763        __struct.param_type =
22764            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
22765                enum_type: "MavParamExtType",
22766                value: tmp as u32,
22767            })?;
22768        Ok(__struct)
22769    }
22770    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22771        let mut __tmp = BytesMut::new(bytes);
22772        #[allow(clippy::absurd_extreme_comparisons)]
22773        #[allow(unused_comparisons)]
22774        if __tmp.remaining() < Self::ENCODED_LEN {
22775            panic!(
22776                "buffer is too small (need {} bytes, but got {})",
22777                Self::ENCODED_LEN,
22778                __tmp.remaining(),
22779            )
22780        }
22781        __tmp.put_u16_le(self.param_count);
22782        __tmp.put_u16_le(self.param_index);
22783        for val in &self.param_id {
22784            __tmp.put_u8(*val);
22785        }
22786        for val in &self.param_value {
22787            __tmp.put_u8(*val);
22788        }
22789        __tmp.put_u8(self.param_type as u8);
22790        if matches!(version, MavlinkVersion::V2) {
22791            let len = __tmp.len();
22792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22793        } else {
22794            __tmp.len()
22795        }
22796    }
22797}
22798#[doc = "id: 50"]
22799#[doc = "Bind a RC channel to a parameter. The parameter should change according to the RC channel value."]
22800#[derive(Debug, Clone, PartialEq)]
22801#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22802#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22803pub struct PARAM_MAP_RC_DATA {
22804    #[doc = "Initial parameter value"]
22805    pub param_value0: f32,
22806    #[doc = "Scale, maps the RC range [-1, 1] to a parameter value"]
22807    pub scale: f32,
22808    #[doc = "Minimum param value. The protocol does not define if this overwrites an onboard minimum value. (Depends on implementation)"]
22809    pub param_value_min: f32,
22810    #[doc = "Maximum param value. The protocol does not define if this overwrites an onboard maximum value. (Depends on implementation)"]
22811    pub param_value_max: f32,
22812    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored), send -2 to disable any existing map for this rc_channel_index."]
22813    pub param_index: i16,
22814    #[doc = "System ID"]
22815    pub target_system: u8,
22816    #[doc = "Component ID"]
22817    pub target_component: u8,
22818    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
22819    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
22820    pub param_id: [u8; 16],
22821    #[doc = "Index of parameter RC channel. Not equal to the RC channel id. Typically corresponds to a potentiometer-knob on the RC."]
22822    pub parameter_rc_channel_index: u8,
22823}
22824impl PARAM_MAP_RC_DATA {
22825    pub const ENCODED_LEN: usize = 37usize;
22826    pub const DEFAULT: Self = Self {
22827        param_value0: 0.0_f32,
22828        scale: 0.0_f32,
22829        param_value_min: 0.0_f32,
22830        param_value_max: 0.0_f32,
22831        param_index: 0_i16,
22832        target_system: 0_u8,
22833        target_component: 0_u8,
22834        param_id: [0_u8; 16usize],
22835        parameter_rc_channel_index: 0_u8,
22836    };
22837    #[cfg(feature = "arbitrary")]
22838    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22839        use arbitrary::{Arbitrary, Unstructured};
22840        let mut buf = [0u8; 1024];
22841        rng.fill_bytes(&mut buf);
22842        let mut unstructured = Unstructured::new(&buf);
22843        Self::arbitrary(&mut unstructured).unwrap_or_default()
22844    }
22845}
22846impl Default for PARAM_MAP_RC_DATA {
22847    fn default() -> Self {
22848        Self::DEFAULT.clone()
22849    }
22850}
22851impl MessageData for PARAM_MAP_RC_DATA {
22852    type Message = MavMessage;
22853    const ID: u32 = 50u32;
22854    const NAME: &'static str = "PARAM_MAP_RC";
22855    const EXTRA_CRC: u8 = 78u8;
22856    const ENCODED_LEN: usize = 37usize;
22857    fn deser(
22858        _version: MavlinkVersion,
22859        __input: &[u8],
22860    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22861        let avail_len = __input.len();
22862        let mut payload_buf = [0; Self::ENCODED_LEN];
22863        let mut buf = if avail_len < Self::ENCODED_LEN {
22864            payload_buf[0..avail_len].copy_from_slice(__input);
22865            Bytes::new(&payload_buf)
22866        } else {
22867            Bytes::new(__input)
22868        };
22869        let mut __struct = Self::default();
22870        __struct.param_value0 = buf.get_f32_le();
22871        __struct.scale = buf.get_f32_le();
22872        __struct.param_value_min = buf.get_f32_le();
22873        __struct.param_value_max = buf.get_f32_le();
22874        __struct.param_index = buf.get_i16_le();
22875        __struct.target_system = buf.get_u8();
22876        __struct.target_component = buf.get_u8();
22877        for v in &mut __struct.param_id {
22878            let val = buf.get_u8();
22879            *v = val;
22880        }
22881        __struct.parameter_rc_channel_index = buf.get_u8();
22882        Ok(__struct)
22883    }
22884    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22885        let mut __tmp = BytesMut::new(bytes);
22886        #[allow(clippy::absurd_extreme_comparisons)]
22887        #[allow(unused_comparisons)]
22888        if __tmp.remaining() < Self::ENCODED_LEN {
22889            panic!(
22890                "buffer is too small (need {} bytes, but got {})",
22891                Self::ENCODED_LEN,
22892                __tmp.remaining(),
22893            )
22894        }
22895        __tmp.put_f32_le(self.param_value0);
22896        __tmp.put_f32_le(self.scale);
22897        __tmp.put_f32_le(self.param_value_min);
22898        __tmp.put_f32_le(self.param_value_max);
22899        __tmp.put_i16_le(self.param_index);
22900        __tmp.put_u8(self.target_system);
22901        __tmp.put_u8(self.target_component);
22902        for val in &self.param_id {
22903            __tmp.put_u8(*val);
22904        }
22905        __tmp.put_u8(self.parameter_rc_channel_index);
22906        if matches!(version, MavlinkVersion::V2) {
22907            let len = __tmp.len();
22908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22909        } else {
22910            __tmp.len()
22911        }
22912    }
22913}
22914#[doc = "id: 21"]
22915#[doc = "Request all parameters of this component. After this request, all parameters are emitted. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
22916#[derive(Debug, Clone, PartialEq)]
22917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22919pub struct PARAM_REQUEST_LIST_DATA {
22920    #[doc = "System ID"]
22921    pub target_system: u8,
22922    #[doc = "Component ID"]
22923    pub target_component: u8,
22924}
22925impl PARAM_REQUEST_LIST_DATA {
22926    pub const ENCODED_LEN: usize = 2usize;
22927    pub const DEFAULT: Self = Self {
22928        target_system: 0_u8,
22929        target_component: 0_u8,
22930    };
22931    #[cfg(feature = "arbitrary")]
22932    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
22933        use arbitrary::{Arbitrary, Unstructured};
22934        let mut buf = [0u8; 1024];
22935        rng.fill_bytes(&mut buf);
22936        let mut unstructured = Unstructured::new(&buf);
22937        Self::arbitrary(&mut unstructured).unwrap_or_default()
22938    }
22939}
22940impl Default for PARAM_REQUEST_LIST_DATA {
22941    fn default() -> Self {
22942        Self::DEFAULT.clone()
22943    }
22944}
22945impl MessageData for PARAM_REQUEST_LIST_DATA {
22946    type Message = MavMessage;
22947    const ID: u32 = 21u32;
22948    const NAME: &'static str = "PARAM_REQUEST_LIST";
22949    const EXTRA_CRC: u8 = 159u8;
22950    const ENCODED_LEN: usize = 2usize;
22951    fn deser(
22952        _version: MavlinkVersion,
22953        __input: &[u8],
22954    ) -> Result<Self, ::mavlink_core::error::ParserError> {
22955        let avail_len = __input.len();
22956        let mut payload_buf = [0; Self::ENCODED_LEN];
22957        let mut buf = if avail_len < Self::ENCODED_LEN {
22958            payload_buf[0..avail_len].copy_from_slice(__input);
22959            Bytes::new(&payload_buf)
22960        } else {
22961            Bytes::new(__input)
22962        };
22963        let mut __struct = Self::default();
22964        __struct.target_system = buf.get_u8();
22965        __struct.target_component = buf.get_u8();
22966        Ok(__struct)
22967    }
22968    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
22969        let mut __tmp = BytesMut::new(bytes);
22970        #[allow(clippy::absurd_extreme_comparisons)]
22971        #[allow(unused_comparisons)]
22972        if __tmp.remaining() < Self::ENCODED_LEN {
22973            panic!(
22974                "buffer is too small (need {} bytes, but got {})",
22975                Self::ENCODED_LEN,
22976                __tmp.remaining(),
22977            )
22978        }
22979        __tmp.put_u8(self.target_system);
22980        __tmp.put_u8(self.target_component);
22981        if matches!(version, MavlinkVersion::V2) {
22982            let len = __tmp.len();
22983            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
22984        } else {
22985            __tmp.len()
22986        }
22987    }
22988}
22989#[doc = "id: 20"]
22990#[doc = "value[float]. This allows to send a parameter to any other component (such as the GCS) without the need of previous knowledge of possible parameter names. Thus the same GCS can store different parameters for different autopilots. See also <https://mavlink.io/en/services/parameter.html> for a full documentation of QGroundControl and IMU code."]
22991#[derive(Debug, Clone, PartialEq)]
22992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
22993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
22994pub struct PARAM_REQUEST_READ_DATA {
22995    #[doc = "Parameter index. Send -1 to use the param ID field as identifier (else the param id will be ignored)"]
22996    pub param_index: i16,
22997    #[doc = "System ID"]
22998    pub target_system: u8,
22999    #[doc = "Component ID"]
23000    pub target_component: u8,
23001    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23002    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23003    pub param_id: [u8; 16],
23004}
23005impl PARAM_REQUEST_READ_DATA {
23006    pub const ENCODED_LEN: usize = 20usize;
23007    pub const DEFAULT: Self = Self {
23008        param_index: 0_i16,
23009        target_system: 0_u8,
23010        target_component: 0_u8,
23011        param_id: [0_u8; 16usize],
23012    };
23013    #[cfg(feature = "arbitrary")]
23014    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23015        use arbitrary::{Arbitrary, Unstructured};
23016        let mut buf = [0u8; 1024];
23017        rng.fill_bytes(&mut buf);
23018        let mut unstructured = Unstructured::new(&buf);
23019        Self::arbitrary(&mut unstructured).unwrap_or_default()
23020    }
23021}
23022impl Default for PARAM_REQUEST_READ_DATA {
23023    fn default() -> Self {
23024        Self::DEFAULT.clone()
23025    }
23026}
23027impl MessageData for PARAM_REQUEST_READ_DATA {
23028    type Message = MavMessage;
23029    const ID: u32 = 20u32;
23030    const NAME: &'static str = "PARAM_REQUEST_READ";
23031    const EXTRA_CRC: u8 = 214u8;
23032    const ENCODED_LEN: usize = 20usize;
23033    fn deser(
23034        _version: MavlinkVersion,
23035        __input: &[u8],
23036    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23037        let avail_len = __input.len();
23038        let mut payload_buf = [0; Self::ENCODED_LEN];
23039        let mut buf = if avail_len < Self::ENCODED_LEN {
23040            payload_buf[0..avail_len].copy_from_slice(__input);
23041            Bytes::new(&payload_buf)
23042        } else {
23043            Bytes::new(__input)
23044        };
23045        let mut __struct = Self::default();
23046        __struct.param_index = buf.get_i16_le();
23047        __struct.target_system = buf.get_u8();
23048        __struct.target_component = buf.get_u8();
23049        for v in &mut __struct.param_id {
23050            let val = buf.get_u8();
23051            *v = val;
23052        }
23053        Ok(__struct)
23054    }
23055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23056        let mut __tmp = BytesMut::new(bytes);
23057        #[allow(clippy::absurd_extreme_comparisons)]
23058        #[allow(unused_comparisons)]
23059        if __tmp.remaining() < Self::ENCODED_LEN {
23060            panic!(
23061                "buffer is too small (need {} bytes, but got {})",
23062                Self::ENCODED_LEN,
23063                __tmp.remaining(),
23064            )
23065        }
23066        __tmp.put_i16_le(self.param_index);
23067        __tmp.put_u8(self.target_system);
23068        __tmp.put_u8(self.target_component);
23069        for val in &self.param_id {
23070            __tmp.put_u8(*val);
23071        }
23072        if matches!(version, MavlinkVersion::V2) {
23073            let len = __tmp.len();
23074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23075        } else {
23076            __tmp.len()
23077        }
23078    }
23079}
23080#[doc = "id: 23"]
23081#[doc = "Set a parameter value (write new value to permanent storage).         The receiving component should acknowledge the new parameter value by broadcasting a PARAM_VALUE message (broadcasting ensures that multiple GCS all have an up-to-date list of all parameters). If the sending GCS did not receive a PARAM_VALUE within its timeout time, it should re-send the PARAM_SET message. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23082#[derive(Debug, Clone, PartialEq)]
23083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23085pub struct PARAM_SET_DATA {
23086    #[doc = "Onboard parameter value"]
23087    pub param_value: f32,
23088    #[doc = "System ID"]
23089    pub target_system: u8,
23090    #[doc = "Component ID"]
23091    pub target_component: u8,
23092    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23093    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23094    pub param_id: [u8; 16],
23095    #[doc = "Onboard parameter type."]
23096    pub param_type: MavParamType,
23097}
23098impl PARAM_SET_DATA {
23099    pub const ENCODED_LEN: usize = 23usize;
23100    pub const DEFAULT: Self = Self {
23101        param_value: 0.0_f32,
23102        target_system: 0_u8,
23103        target_component: 0_u8,
23104        param_id: [0_u8; 16usize],
23105        param_type: MavParamType::DEFAULT,
23106    };
23107    #[cfg(feature = "arbitrary")]
23108    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23109        use arbitrary::{Arbitrary, Unstructured};
23110        let mut buf = [0u8; 1024];
23111        rng.fill_bytes(&mut buf);
23112        let mut unstructured = Unstructured::new(&buf);
23113        Self::arbitrary(&mut unstructured).unwrap_or_default()
23114    }
23115}
23116impl Default for PARAM_SET_DATA {
23117    fn default() -> Self {
23118        Self::DEFAULT.clone()
23119    }
23120}
23121impl MessageData for PARAM_SET_DATA {
23122    type Message = MavMessage;
23123    const ID: u32 = 23u32;
23124    const NAME: &'static str = "PARAM_SET";
23125    const EXTRA_CRC: u8 = 168u8;
23126    const ENCODED_LEN: usize = 23usize;
23127    fn deser(
23128        _version: MavlinkVersion,
23129        __input: &[u8],
23130    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23131        let avail_len = __input.len();
23132        let mut payload_buf = [0; Self::ENCODED_LEN];
23133        let mut buf = if avail_len < Self::ENCODED_LEN {
23134            payload_buf[0..avail_len].copy_from_slice(__input);
23135            Bytes::new(&payload_buf)
23136        } else {
23137            Bytes::new(__input)
23138        };
23139        let mut __struct = Self::default();
23140        __struct.param_value = buf.get_f32_le();
23141        __struct.target_system = buf.get_u8();
23142        __struct.target_component = buf.get_u8();
23143        for v in &mut __struct.param_id {
23144            let val = buf.get_u8();
23145            *v = val;
23146        }
23147        let tmp = buf.get_u8();
23148        __struct.param_type =
23149            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23150                enum_type: "MavParamType",
23151                value: tmp as u32,
23152            })?;
23153        Ok(__struct)
23154    }
23155    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23156        let mut __tmp = BytesMut::new(bytes);
23157        #[allow(clippy::absurd_extreme_comparisons)]
23158        #[allow(unused_comparisons)]
23159        if __tmp.remaining() < Self::ENCODED_LEN {
23160            panic!(
23161                "buffer is too small (need {} bytes, but got {})",
23162                Self::ENCODED_LEN,
23163                __tmp.remaining(),
23164            )
23165        }
23166        __tmp.put_f32_le(self.param_value);
23167        __tmp.put_u8(self.target_system);
23168        __tmp.put_u8(self.target_component);
23169        for val in &self.param_id {
23170            __tmp.put_u8(*val);
23171        }
23172        __tmp.put_u8(self.param_type as u8);
23173        if matches!(version, MavlinkVersion::V2) {
23174            let len = __tmp.len();
23175            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23176        } else {
23177            __tmp.len()
23178        }
23179    }
23180}
23181#[doc = "id: 22"]
23182#[doc = "Emit the value of a onboard parameter. The inclusion of param_count and param_index in the message allows the recipient to keep track of received parameters and allows him to re-request missing parameters after a loss or timeout. The parameter microservice is documented at <https://mavlink.io/en/services/parameter.html>."]
23183#[derive(Debug, Clone, PartialEq)]
23184#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23185#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23186pub struct PARAM_VALUE_DATA {
23187    #[doc = "Onboard parameter value"]
23188    pub param_value: f32,
23189    #[doc = "Total number of onboard parameters"]
23190    pub param_count: u16,
23191    #[doc = "Index of this onboard parameter"]
23192    pub param_index: u16,
23193    #[doc = "Onboard parameter id, terminated by NULL if the length is less than 16 human-readable chars and WITHOUT null termination (NULL) byte if the length is exactly 16 chars - applications have to provide 16+1 bytes storage if the ID is stored as string"]
23194    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23195    pub param_id: [u8; 16],
23196    #[doc = "Onboard parameter type."]
23197    pub param_type: MavParamType,
23198}
23199impl PARAM_VALUE_DATA {
23200    pub const ENCODED_LEN: usize = 25usize;
23201    pub const DEFAULT: Self = Self {
23202        param_value: 0.0_f32,
23203        param_count: 0_u16,
23204        param_index: 0_u16,
23205        param_id: [0_u8; 16usize],
23206        param_type: MavParamType::DEFAULT,
23207    };
23208    #[cfg(feature = "arbitrary")]
23209    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23210        use arbitrary::{Arbitrary, Unstructured};
23211        let mut buf = [0u8; 1024];
23212        rng.fill_bytes(&mut buf);
23213        let mut unstructured = Unstructured::new(&buf);
23214        Self::arbitrary(&mut unstructured).unwrap_or_default()
23215    }
23216}
23217impl Default for PARAM_VALUE_DATA {
23218    fn default() -> Self {
23219        Self::DEFAULT.clone()
23220    }
23221}
23222impl MessageData for PARAM_VALUE_DATA {
23223    type Message = MavMessage;
23224    const ID: u32 = 22u32;
23225    const NAME: &'static str = "PARAM_VALUE";
23226    const EXTRA_CRC: u8 = 220u8;
23227    const ENCODED_LEN: usize = 25usize;
23228    fn deser(
23229        _version: MavlinkVersion,
23230        __input: &[u8],
23231    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23232        let avail_len = __input.len();
23233        let mut payload_buf = [0; Self::ENCODED_LEN];
23234        let mut buf = if avail_len < Self::ENCODED_LEN {
23235            payload_buf[0..avail_len].copy_from_slice(__input);
23236            Bytes::new(&payload_buf)
23237        } else {
23238            Bytes::new(__input)
23239        };
23240        let mut __struct = Self::default();
23241        __struct.param_value = buf.get_f32_le();
23242        __struct.param_count = buf.get_u16_le();
23243        __struct.param_index = buf.get_u16_le();
23244        for v in &mut __struct.param_id {
23245            let val = buf.get_u8();
23246            *v = val;
23247        }
23248        let tmp = buf.get_u8();
23249        __struct.param_type =
23250            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23251                enum_type: "MavParamType",
23252                value: tmp as u32,
23253            })?;
23254        Ok(__struct)
23255    }
23256    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23257        let mut __tmp = BytesMut::new(bytes);
23258        #[allow(clippy::absurd_extreme_comparisons)]
23259        #[allow(unused_comparisons)]
23260        if __tmp.remaining() < Self::ENCODED_LEN {
23261            panic!(
23262                "buffer is too small (need {} bytes, but got {})",
23263                Self::ENCODED_LEN,
23264                __tmp.remaining(),
23265            )
23266        }
23267        __tmp.put_f32_le(self.param_value);
23268        __tmp.put_u16_le(self.param_count);
23269        __tmp.put_u16_le(self.param_index);
23270        for val in &self.param_id {
23271            __tmp.put_u8(*val);
23272        }
23273        __tmp.put_u8(self.param_type as u8);
23274        if matches!(version, MavlinkVersion::V2) {
23275            let len = __tmp.len();
23276            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23277        } else {
23278            __tmp.len()
23279        }
23280    }
23281}
23282#[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
23283#[doc = "id: 4"]
23284#[doc = "A ping message either requesting or responding to a ping. This allows to measure the system latencies, including serial port, radio modem and UDP connections. The ping microservice is documented at <https://mavlink.io/en/services/ping.html>."]
23285#[derive(Debug, Clone, PartialEq)]
23286#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23287#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23288pub struct PING_DATA {
23289    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
23290    pub time_usec: u64,
23291    #[doc = "PING sequence"]
23292    pub seq: u32,
23293    #[doc = "0: request ping from all receiving systems. If greater than 0: message is a ping response and number is the system id of the requesting system"]
23294    pub target_system: u8,
23295    #[doc = "0: request ping from all receiving components. If greater than 0: message is a ping response and number is the component id of the requesting component."]
23296    pub target_component: u8,
23297}
23298impl PING_DATA {
23299    pub const ENCODED_LEN: usize = 14usize;
23300    pub const DEFAULT: Self = Self {
23301        time_usec: 0_u64,
23302        seq: 0_u32,
23303        target_system: 0_u8,
23304        target_component: 0_u8,
23305    };
23306    #[cfg(feature = "arbitrary")]
23307    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23308        use arbitrary::{Arbitrary, Unstructured};
23309        let mut buf = [0u8; 1024];
23310        rng.fill_bytes(&mut buf);
23311        let mut unstructured = Unstructured::new(&buf);
23312        Self::arbitrary(&mut unstructured).unwrap_or_default()
23313    }
23314}
23315impl Default for PING_DATA {
23316    fn default() -> Self {
23317        Self::DEFAULT.clone()
23318    }
23319}
23320impl MessageData for PING_DATA {
23321    type Message = MavMessage;
23322    const ID: u32 = 4u32;
23323    const NAME: &'static str = "PING";
23324    const EXTRA_CRC: u8 = 237u8;
23325    const ENCODED_LEN: usize = 14usize;
23326    fn deser(
23327        _version: MavlinkVersion,
23328        __input: &[u8],
23329    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23330        let avail_len = __input.len();
23331        let mut payload_buf = [0; Self::ENCODED_LEN];
23332        let mut buf = if avail_len < Self::ENCODED_LEN {
23333            payload_buf[0..avail_len].copy_from_slice(__input);
23334            Bytes::new(&payload_buf)
23335        } else {
23336            Bytes::new(__input)
23337        };
23338        let mut __struct = Self::default();
23339        __struct.time_usec = buf.get_u64_le();
23340        __struct.seq = buf.get_u32_le();
23341        __struct.target_system = buf.get_u8();
23342        __struct.target_component = buf.get_u8();
23343        Ok(__struct)
23344    }
23345    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23346        let mut __tmp = BytesMut::new(bytes);
23347        #[allow(clippy::absurd_extreme_comparisons)]
23348        #[allow(unused_comparisons)]
23349        if __tmp.remaining() < Self::ENCODED_LEN {
23350            panic!(
23351                "buffer is too small (need {} bytes, but got {})",
23352                Self::ENCODED_LEN,
23353                __tmp.remaining(),
23354            )
23355        }
23356        __tmp.put_u64_le(self.time_usec);
23357        __tmp.put_u32_le(self.seq);
23358        __tmp.put_u8(self.target_system);
23359        __tmp.put_u8(self.target_component);
23360        if matches!(version, MavlinkVersion::V2) {
23361            let len = __tmp.len();
23362            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23363        } else {
23364            __tmp.len()
23365        }
23366    }
23367}
23368#[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
23369#[doc = "id: 258"]
23370#[doc = "Control vehicle tone generation (buzzer)."]
23371#[derive(Debug, Clone, PartialEq)]
23372#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23373#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23374pub struct PLAY_TUNE_DATA {
23375    #[doc = "System ID"]
23376    pub target_system: u8,
23377    #[doc = "Component ID"]
23378    pub target_component: u8,
23379    #[doc = "tune in board specific format"]
23380    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23381    pub tune: [u8; 30],
23382    #[doc = "tune extension (appended to tune)"]
23383    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
23384    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23385    pub tune2: [u8; 200],
23386}
23387impl PLAY_TUNE_DATA {
23388    pub const ENCODED_LEN: usize = 232usize;
23389    pub const DEFAULT: Self = Self {
23390        target_system: 0_u8,
23391        target_component: 0_u8,
23392        tune: [0_u8; 30usize],
23393        tune2: [0_u8; 200usize],
23394    };
23395    #[cfg(feature = "arbitrary")]
23396    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23397        use arbitrary::{Arbitrary, Unstructured};
23398        let mut buf = [0u8; 1024];
23399        rng.fill_bytes(&mut buf);
23400        let mut unstructured = Unstructured::new(&buf);
23401        Self::arbitrary(&mut unstructured).unwrap_or_default()
23402    }
23403}
23404impl Default for PLAY_TUNE_DATA {
23405    fn default() -> Self {
23406        Self::DEFAULT.clone()
23407    }
23408}
23409impl MessageData for PLAY_TUNE_DATA {
23410    type Message = MavMessage;
23411    const ID: u32 = 258u32;
23412    const NAME: &'static str = "PLAY_TUNE";
23413    const EXTRA_CRC: u8 = 187u8;
23414    const ENCODED_LEN: usize = 232usize;
23415    fn deser(
23416        _version: MavlinkVersion,
23417        __input: &[u8],
23418    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23419        let avail_len = __input.len();
23420        let mut payload_buf = [0; Self::ENCODED_LEN];
23421        let mut buf = if avail_len < Self::ENCODED_LEN {
23422            payload_buf[0..avail_len].copy_from_slice(__input);
23423            Bytes::new(&payload_buf)
23424        } else {
23425            Bytes::new(__input)
23426        };
23427        let mut __struct = Self::default();
23428        __struct.target_system = buf.get_u8();
23429        __struct.target_component = buf.get_u8();
23430        for v in &mut __struct.tune {
23431            let val = buf.get_u8();
23432            *v = val;
23433        }
23434        for v in &mut __struct.tune2 {
23435            let val = buf.get_u8();
23436            *v = val;
23437        }
23438        Ok(__struct)
23439    }
23440    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23441        let mut __tmp = BytesMut::new(bytes);
23442        #[allow(clippy::absurd_extreme_comparisons)]
23443        #[allow(unused_comparisons)]
23444        if __tmp.remaining() < Self::ENCODED_LEN {
23445            panic!(
23446                "buffer is too small (need {} bytes, but got {})",
23447                Self::ENCODED_LEN,
23448                __tmp.remaining(),
23449            )
23450        }
23451        __tmp.put_u8(self.target_system);
23452        __tmp.put_u8(self.target_component);
23453        for val in &self.tune {
23454            __tmp.put_u8(*val);
23455        }
23456        for val in &self.tune2 {
23457            __tmp.put_u8(*val);
23458        }
23459        if matches!(version, MavlinkVersion::V2) {
23460            let len = __tmp.len();
23461            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23462        } else {
23463            __tmp.len()
23464        }
23465    }
23466}
23467#[doc = "id: 400"]
23468#[doc = "Play vehicle tone/tune (buzzer). Supersedes message PLAY_TUNE."]
23469#[derive(Debug, Clone, PartialEq)]
23470#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23471#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23472pub struct PLAY_TUNE_V2_DATA {
23473    #[doc = "Tune format"]
23474    pub format: TuneFormat,
23475    #[doc = "System ID"]
23476    pub target_system: u8,
23477    #[doc = "Component ID"]
23478    pub target_component: u8,
23479    #[doc = "Tune definition as a NULL-terminated string."]
23480    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23481    pub tune: [u8; 248],
23482}
23483impl PLAY_TUNE_V2_DATA {
23484    pub const ENCODED_LEN: usize = 254usize;
23485    pub const DEFAULT: Self = Self {
23486        format: TuneFormat::DEFAULT,
23487        target_system: 0_u8,
23488        target_component: 0_u8,
23489        tune: [0_u8; 248usize],
23490    };
23491    #[cfg(feature = "arbitrary")]
23492    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23493        use arbitrary::{Arbitrary, Unstructured};
23494        let mut buf = [0u8; 1024];
23495        rng.fill_bytes(&mut buf);
23496        let mut unstructured = Unstructured::new(&buf);
23497        Self::arbitrary(&mut unstructured).unwrap_or_default()
23498    }
23499}
23500impl Default for PLAY_TUNE_V2_DATA {
23501    fn default() -> Self {
23502        Self::DEFAULT.clone()
23503    }
23504}
23505impl MessageData for PLAY_TUNE_V2_DATA {
23506    type Message = MavMessage;
23507    const ID: u32 = 400u32;
23508    const NAME: &'static str = "PLAY_TUNE_V2";
23509    const EXTRA_CRC: u8 = 110u8;
23510    const ENCODED_LEN: usize = 254usize;
23511    fn deser(
23512        _version: MavlinkVersion,
23513        __input: &[u8],
23514    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23515        let avail_len = __input.len();
23516        let mut payload_buf = [0; Self::ENCODED_LEN];
23517        let mut buf = if avail_len < Self::ENCODED_LEN {
23518            payload_buf[0..avail_len].copy_from_slice(__input);
23519            Bytes::new(&payload_buf)
23520        } else {
23521            Bytes::new(__input)
23522        };
23523        let mut __struct = Self::default();
23524        let tmp = buf.get_u32_le();
23525        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
23526            ::mavlink_core::error::ParserError::InvalidEnum {
23527                enum_type: "TuneFormat",
23528                value: tmp as u32,
23529            },
23530        )?;
23531        __struct.target_system = buf.get_u8();
23532        __struct.target_component = buf.get_u8();
23533        for v in &mut __struct.tune {
23534            let val = buf.get_u8();
23535            *v = val;
23536        }
23537        Ok(__struct)
23538    }
23539    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23540        let mut __tmp = BytesMut::new(bytes);
23541        #[allow(clippy::absurd_extreme_comparisons)]
23542        #[allow(unused_comparisons)]
23543        if __tmp.remaining() < Self::ENCODED_LEN {
23544            panic!(
23545                "buffer is too small (need {} bytes, but got {})",
23546                Self::ENCODED_LEN,
23547                __tmp.remaining(),
23548            )
23549        }
23550        __tmp.put_u32_le(self.format as u32);
23551        __tmp.put_u8(self.target_system);
23552        __tmp.put_u8(self.target_component);
23553        for val in &self.tune {
23554            __tmp.put_u8(*val);
23555        }
23556        if matches!(version, MavlinkVersion::V2) {
23557            let len = __tmp.len();
23558            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23559        } else {
23560            __tmp.len()
23561        }
23562    }
23563}
23564#[doc = "id: 87"]
23565#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_GLOBAL_INT if the vehicle is being controlled this way."]
23566#[derive(Debug, Clone, PartialEq)]
23567#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23568#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23569pub struct POSITION_TARGET_GLOBAL_INT_DATA {
23570    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
23571    pub time_boot_ms: u32,
23572    #[doc = "Latitude in WGS84 frame"]
23573    pub lat_int: i32,
23574    #[doc = "Longitude in WGS84 frame"]
23575    pub lon_int: i32,
23576    #[doc = "Altitude (MSL, AGL or relative to home altitude, depending on frame)"]
23577    pub alt: f32,
23578    #[doc = "X velocity in NED frame"]
23579    pub vx: f32,
23580    #[doc = "Y velocity in NED frame"]
23581    pub vy: f32,
23582    #[doc = "Z velocity in NED frame"]
23583    pub vz: f32,
23584    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23585    pub afx: f32,
23586    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23587    pub afy: f32,
23588    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23589    pub afz: f32,
23590    #[doc = "yaw setpoint"]
23591    pub yaw: f32,
23592    #[doc = "yaw rate setpoint"]
23593    pub yaw_rate: f32,
23594    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23595    pub type_mask: PositionTargetTypemask,
23596    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
23597    pub coordinate_frame: MavFrame,
23598}
23599impl POSITION_TARGET_GLOBAL_INT_DATA {
23600    pub const ENCODED_LEN: usize = 51usize;
23601    pub const DEFAULT: Self = Self {
23602        time_boot_ms: 0_u32,
23603        lat_int: 0_i32,
23604        lon_int: 0_i32,
23605        alt: 0.0_f32,
23606        vx: 0.0_f32,
23607        vy: 0.0_f32,
23608        vz: 0.0_f32,
23609        afx: 0.0_f32,
23610        afy: 0.0_f32,
23611        afz: 0.0_f32,
23612        yaw: 0.0_f32,
23613        yaw_rate: 0.0_f32,
23614        type_mask: PositionTargetTypemask::DEFAULT,
23615        coordinate_frame: MavFrame::DEFAULT,
23616    };
23617    #[cfg(feature = "arbitrary")]
23618    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23619        use arbitrary::{Arbitrary, Unstructured};
23620        let mut buf = [0u8; 1024];
23621        rng.fill_bytes(&mut buf);
23622        let mut unstructured = Unstructured::new(&buf);
23623        Self::arbitrary(&mut unstructured).unwrap_or_default()
23624    }
23625}
23626impl Default for POSITION_TARGET_GLOBAL_INT_DATA {
23627    fn default() -> Self {
23628        Self::DEFAULT.clone()
23629    }
23630}
23631impl MessageData for POSITION_TARGET_GLOBAL_INT_DATA {
23632    type Message = MavMessage;
23633    const ID: u32 = 87u32;
23634    const NAME: &'static str = "POSITION_TARGET_GLOBAL_INT";
23635    const EXTRA_CRC: u8 = 150u8;
23636    const ENCODED_LEN: usize = 51usize;
23637    fn deser(
23638        _version: MavlinkVersion,
23639        __input: &[u8],
23640    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23641        let avail_len = __input.len();
23642        let mut payload_buf = [0; Self::ENCODED_LEN];
23643        let mut buf = if avail_len < Self::ENCODED_LEN {
23644            payload_buf[0..avail_len].copy_from_slice(__input);
23645            Bytes::new(&payload_buf)
23646        } else {
23647            Bytes::new(__input)
23648        };
23649        let mut __struct = Self::default();
23650        __struct.time_boot_ms = buf.get_u32_le();
23651        __struct.lat_int = buf.get_i32_le();
23652        __struct.lon_int = buf.get_i32_le();
23653        __struct.alt = buf.get_f32_le();
23654        __struct.vx = buf.get_f32_le();
23655        __struct.vy = buf.get_f32_le();
23656        __struct.vz = buf.get_f32_le();
23657        __struct.afx = buf.get_f32_le();
23658        __struct.afy = buf.get_f32_le();
23659        __struct.afz = buf.get_f32_le();
23660        __struct.yaw = buf.get_f32_le();
23661        __struct.yaw_rate = buf.get_f32_le();
23662        let tmp = buf.get_u16_le();
23663        __struct.type_mask = PositionTargetTypemask::from_bits(
23664            tmp & PositionTargetTypemask::all().bits(),
23665        )
23666        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23667            flag_type: "PositionTargetTypemask",
23668            value: tmp as u32,
23669        })?;
23670        let tmp = buf.get_u8();
23671        __struct.coordinate_frame =
23672            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23673                enum_type: "MavFrame",
23674                value: tmp as u32,
23675            })?;
23676        Ok(__struct)
23677    }
23678    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23679        let mut __tmp = BytesMut::new(bytes);
23680        #[allow(clippy::absurd_extreme_comparisons)]
23681        #[allow(unused_comparisons)]
23682        if __tmp.remaining() < Self::ENCODED_LEN {
23683            panic!(
23684                "buffer is too small (need {} bytes, but got {})",
23685                Self::ENCODED_LEN,
23686                __tmp.remaining(),
23687            )
23688        }
23689        __tmp.put_u32_le(self.time_boot_ms);
23690        __tmp.put_i32_le(self.lat_int);
23691        __tmp.put_i32_le(self.lon_int);
23692        __tmp.put_f32_le(self.alt);
23693        __tmp.put_f32_le(self.vx);
23694        __tmp.put_f32_le(self.vy);
23695        __tmp.put_f32_le(self.vz);
23696        __tmp.put_f32_le(self.afx);
23697        __tmp.put_f32_le(self.afy);
23698        __tmp.put_f32_le(self.afz);
23699        __tmp.put_f32_le(self.yaw);
23700        __tmp.put_f32_le(self.yaw_rate);
23701        __tmp.put_u16_le(self.type_mask.bits());
23702        __tmp.put_u8(self.coordinate_frame as u8);
23703        if matches!(version, MavlinkVersion::V2) {
23704            let len = __tmp.len();
23705            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23706        } else {
23707            __tmp.len()
23708        }
23709    }
23710}
23711#[doc = "id: 85"]
23712#[doc = "Reports the current commanded vehicle position, velocity, and acceleration as specified by the autopilot. This should match the commands sent in SET_POSITION_TARGET_LOCAL_NED if the vehicle is being controlled this way."]
23713#[derive(Debug, Clone, PartialEq)]
23714#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23715#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23716pub struct POSITION_TARGET_LOCAL_NED_DATA {
23717    #[doc = "Timestamp (time since system boot)."]
23718    pub time_boot_ms: u32,
23719    #[doc = "X Position in NED frame"]
23720    pub x: f32,
23721    #[doc = "Y Position in NED frame"]
23722    pub y: f32,
23723    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
23724    pub z: f32,
23725    #[doc = "X velocity in NED frame"]
23726    pub vx: f32,
23727    #[doc = "Y velocity in NED frame"]
23728    pub vy: f32,
23729    #[doc = "Z velocity in NED frame"]
23730    pub vz: f32,
23731    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23732    pub afx: f32,
23733    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23734    pub afy: f32,
23735    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
23736    pub afz: f32,
23737    #[doc = "yaw setpoint"]
23738    pub yaw: f32,
23739    #[doc = "yaw rate setpoint"]
23740    pub yaw_rate: f32,
23741    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
23742    pub type_mask: PositionTargetTypemask,
23743    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
23744    pub coordinate_frame: MavFrame,
23745}
23746impl POSITION_TARGET_LOCAL_NED_DATA {
23747    pub const ENCODED_LEN: usize = 51usize;
23748    pub const DEFAULT: Self = Self {
23749        time_boot_ms: 0_u32,
23750        x: 0.0_f32,
23751        y: 0.0_f32,
23752        z: 0.0_f32,
23753        vx: 0.0_f32,
23754        vy: 0.0_f32,
23755        vz: 0.0_f32,
23756        afx: 0.0_f32,
23757        afy: 0.0_f32,
23758        afz: 0.0_f32,
23759        yaw: 0.0_f32,
23760        yaw_rate: 0.0_f32,
23761        type_mask: PositionTargetTypemask::DEFAULT,
23762        coordinate_frame: MavFrame::DEFAULT,
23763    };
23764    #[cfg(feature = "arbitrary")]
23765    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23766        use arbitrary::{Arbitrary, Unstructured};
23767        let mut buf = [0u8; 1024];
23768        rng.fill_bytes(&mut buf);
23769        let mut unstructured = Unstructured::new(&buf);
23770        Self::arbitrary(&mut unstructured).unwrap_or_default()
23771    }
23772}
23773impl Default for POSITION_TARGET_LOCAL_NED_DATA {
23774    fn default() -> Self {
23775        Self::DEFAULT.clone()
23776    }
23777}
23778impl MessageData for POSITION_TARGET_LOCAL_NED_DATA {
23779    type Message = MavMessage;
23780    const ID: u32 = 85u32;
23781    const NAME: &'static str = "POSITION_TARGET_LOCAL_NED";
23782    const EXTRA_CRC: u8 = 140u8;
23783    const ENCODED_LEN: usize = 51usize;
23784    fn deser(
23785        _version: MavlinkVersion,
23786        __input: &[u8],
23787    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23788        let avail_len = __input.len();
23789        let mut payload_buf = [0; Self::ENCODED_LEN];
23790        let mut buf = if avail_len < Self::ENCODED_LEN {
23791            payload_buf[0..avail_len].copy_from_slice(__input);
23792            Bytes::new(&payload_buf)
23793        } else {
23794            Bytes::new(__input)
23795        };
23796        let mut __struct = Self::default();
23797        __struct.time_boot_ms = buf.get_u32_le();
23798        __struct.x = buf.get_f32_le();
23799        __struct.y = buf.get_f32_le();
23800        __struct.z = buf.get_f32_le();
23801        __struct.vx = buf.get_f32_le();
23802        __struct.vy = buf.get_f32_le();
23803        __struct.vz = buf.get_f32_le();
23804        __struct.afx = buf.get_f32_le();
23805        __struct.afy = buf.get_f32_le();
23806        __struct.afz = buf.get_f32_le();
23807        __struct.yaw = buf.get_f32_le();
23808        __struct.yaw_rate = buf.get_f32_le();
23809        let tmp = buf.get_u16_le();
23810        __struct.type_mask = PositionTargetTypemask::from_bits(
23811            tmp & PositionTargetTypemask::all().bits(),
23812        )
23813        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
23814            flag_type: "PositionTargetTypemask",
23815            value: tmp as u32,
23816        })?;
23817        let tmp = buf.get_u8();
23818        __struct.coordinate_frame =
23819            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
23820                enum_type: "MavFrame",
23821                value: tmp as u32,
23822            })?;
23823        Ok(__struct)
23824    }
23825    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23826        let mut __tmp = BytesMut::new(bytes);
23827        #[allow(clippy::absurd_extreme_comparisons)]
23828        #[allow(unused_comparisons)]
23829        if __tmp.remaining() < Self::ENCODED_LEN {
23830            panic!(
23831                "buffer is too small (need {} bytes, but got {})",
23832                Self::ENCODED_LEN,
23833                __tmp.remaining(),
23834            )
23835        }
23836        __tmp.put_u32_le(self.time_boot_ms);
23837        __tmp.put_f32_le(self.x);
23838        __tmp.put_f32_le(self.y);
23839        __tmp.put_f32_le(self.z);
23840        __tmp.put_f32_le(self.vx);
23841        __tmp.put_f32_le(self.vy);
23842        __tmp.put_f32_le(self.vz);
23843        __tmp.put_f32_le(self.afx);
23844        __tmp.put_f32_le(self.afy);
23845        __tmp.put_f32_le(self.afz);
23846        __tmp.put_f32_le(self.yaw);
23847        __tmp.put_f32_le(self.yaw_rate);
23848        __tmp.put_u16_le(self.type_mask.bits());
23849        __tmp.put_u8(self.coordinate_frame as u8);
23850        if matches!(version, MavlinkVersion::V2) {
23851            let len = __tmp.len();
23852            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23853        } else {
23854            __tmp.len()
23855        }
23856    }
23857}
23858#[doc = "id: 125"]
23859#[doc = "Power supply status."]
23860#[derive(Debug, Clone, PartialEq)]
23861#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23862#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23863pub struct POWER_STATUS_DATA {
23864    #[doc = "5V rail voltage."]
23865    pub Vcc: u16,
23866    #[doc = "Servo rail voltage."]
23867    pub Vservo: u16,
23868    #[doc = "Bitmap of power supply status flags."]
23869    pub flags: MavPowerStatus,
23870}
23871impl POWER_STATUS_DATA {
23872    pub const ENCODED_LEN: usize = 6usize;
23873    pub const DEFAULT: Self = Self {
23874        Vcc: 0_u16,
23875        Vservo: 0_u16,
23876        flags: MavPowerStatus::DEFAULT,
23877    };
23878    #[cfg(feature = "arbitrary")]
23879    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23880        use arbitrary::{Arbitrary, Unstructured};
23881        let mut buf = [0u8; 1024];
23882        rng.fill_bytes(&mut buf);
23883        let mut unstructured = Unstructured::new(&buf);
23884        Self::arbitrary(&mut unstructured).unwrap_or_default()
23885    }
23886}
23887impl Default for POWER_STATUS_DATA {
23888    fn default() -> Self {
23889        Self::DEFAULT.clone()
23890    }
23891}
23892impl MessageData for POWER_STATUS_DATA {
23893    type Message = MavMessage;
23894    const ID: u32 = 125u32;
23895    const NAME: &'static str = "POWER_STATUS";
23896    const EXTRA_CRC: u8 = 203u8;
23897    const ENCODED_LEN: usize = 6usize;
23898    fn deser(
23899        _version: MavlinkVersion,
23900        __input: &[u8],
23901    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23902        let avail_len = __input.len();
23903        let mut payload_buf = [0; Self::ENCODED_LEN];
23904        let mut buf = if avail_len < Self::ENCODED_LEN {
23905            payload_buf[0..avail_len].copy_from_slice(__input);
23906            Bytes::new(&payload_buf)
23907        } else {
23908            Bytes::new(__input)
23909        };
23910        let mut __struct = Self::default();
23911        __struct.Vcc = buf.get_u16_le();
23912        __struct.Vservo = buf.get_u16_le();
23913        let tmp = buf.get_u16_le();
23914        __struct.flags = MavPowerStatus::from_bits(tmp & MavPowerStatus::all().bits()).ok_or(
23915            ::mavlink_core::error::ParserError::InvalidFlag {
23916                flag_type: "MavPowerStatus",
23917                value: tmp as u32,
23918            },
23919        )?;
23920        Ok(__struct)
23921    }
23922    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
23923        let mut __tmp = BytesMut::new(bytes);
23924        #[allow(clippy::absurd_extreme_comparisons)]
23925        #[allow(unused_comparisons)]
23926        if __tmp.remaining() < Self::ENCODED_LEN {
23927            panic!(
23928                "buffer is too small (need {} bytes, but got {})",
23929                Self::ENCODED_LEN,
23930                __tmp.remaining(),
23931            )
23932        }
23933        __tmp.put_u16_le(self.Vcc);
23934        __tmp.put_u16_le(self.Vservo);
23935        __tmp.put_u16_le(self.flags.bits());
23936        if matches!(version, MavlinkVersion::V2) {
23937            let len = __tmp.len();
23938            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
23939        } else {
23940            __tmp.len()
23941        }
23942    }
23943}
23944#[doc = "id: 300"]
23945#[doc = "Version and capability of protocol version. This message can be requested with MAV_CMD_REQUEST_MESSAGE and is used as part of the handshaking to establish which MAVLink version should be used on the network. Every node should respond to a request for PROTOCOL_VERSION to enable the handshaking. Library implementers should consider adding this into the default decoding state machine to allow the protocol core to respond directly."]
23946#[derive(Debug, Clone, PartialEq)]
23947#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
23948#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
23949pub struct PROTOCOL_VERSION_DATA {
23950    #[doc = "Currently active MAVLink version number * 100: v1.0 is 100, v2.0 is 200, etc."]
23951    pub version: u16,
23952    #[doc = "Minimum MAVLink version supported"]
23953    pub min_version: u16,
23954    #[doc = "Maximum MAVLink version supported (set to the same value as version by default)"]
23955    pub max_version: u16,
23956    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
23957    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23958    pub spec_version_hash: [u8; 8],
23959    #[doc = "The first 8 bytes (not characters printed in hex!) of the git hash."]
23960    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
23961    pub library_version_hash: [u8; 8],
23962}
23963impl PROTOCOL_VERSION_DATA {
23964    pub const ENCODED_LEN: usize = 22usize;
23965    pub const DEFAULT: Self = Self {
23966        version: 0_u16,
23967        min_version: 0_u16,
23968        max_version: 0_u16,
23969        spec_version_hash: [0_u8; 8usize],
23970        library_version_hash: [0_u8; 8usize],
23971    };
23972    #[cfg(feature = "arbitrary")]
23973    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
23974        use arbitrary::{Arbitrary, Unstructured};
23975        let mut buf = [0u8; 1024];
23976        rng.fill_bytes(&mut buf);
23977        let mut unstructured = Unstructured::new(&buf);
23978        Self::arbitrary(&mut unstructured).unwrap_or_default()
23979    }
23980}
23981impl Default for PROTOCOL_VERSION_DATA {
23982    fn default() -> Self {
23983        Self::DEFAULT.clone()
23984    }
23985}
23986impl MessageData for PROTOCOL_VERSION_DATA {
23987    type Message = MavMessage;
23988    const ID: u32 = 300u32;
23989    const NAME: &'static str = "PROTOCOL_VERSION";
23990    const EXTRA_CRC: u8 = 217u8;
23991    const ENCODED_LEN: usize = 22usize;
23992    fn deser(
23993        _version: MavlinkVersion,
23994        __input: &[u8],
23995    ) -> Result<Self, ::mavlink_core::error::ParserError> {
23996        let avail_len = __input.len();
23997        let mut payload_buf = [0; Self::ENCODED_LEN];
23998        let mut buf = if avail_len < Self::ENCODED_LEN {
23999            payload_buf[0..avail_len].copy_from_slice(__input);
24000            Bytes::new(&payload_buf)
24001        } else {
24002            Bytes::new(__input)
24003        };
24004        let mut __struct = Self::default();
24005        __struct.version = buf.get_u16_le();
24006        __struct.min_version = buf.get_u16_le();
24007        __struct.max_version = buf.get_u16_le();
24008        for v in &mut __struct.spec_version_hash {
24009            let val = buf.get_u8();
24010            *v = val;
24011        }
24012        for v in &mut __struct.library_version_hash {
24013            let val = buf.get_u8();
24014            *v = val;
24015        }
24016        Ok(__struct)
24017    }
24018    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24019        let mut __tmp = BytesMut::new(bytes);
24020        #[allow(clippy::absurd_extreme_comparisons)]
24021        #[allow(unused_comparisons)]
24022        if __tmp.remaining() < Self::ENCODED_LEN {
24023            panic!(
24024                "buffer is too small (need {} bytes, but got {})",
24025                Self::ENCODED_LEN,
24026                __tmp.remaining(),
24027            )
24028        }
24029        __tmp.put_u16_le(self.version);
24030        __tmp.put_u16_le(self.min_version);
24031        __tmp.put_u16_le(self.max_version);
24032        for val in &self.spec_version_hash {
24033            __tmp.put_u8(*val);
24034        }
24035        for val in &self.library_version_hash {
24036            __tmp.put_u8(*val);
24037        }
24038        if matches!(version, MavlinkVersion::V2) {
24039            let len = __tmp.len();
24040            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24041        } else {
24042            __tmp.len()
24043        }
24044    }
24045}
24046#[doc = "id: 221"]
24047#[doc = "Complete set of calibration parameters for the radio."]
24048#[derive(Debug, Clone, PartialEq)]
24049#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24050#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24051pub struct RADIO_CALIBRATION_DATA {
24052    #[doc = "Aileron setpoints: left, center, right"]
24053    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24054    pub aileron: [u16; 3],
24055    #[doc = "Elevator setpoints: nose down, center, nose up"]
24056    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24057    pub elevator: [u16; 3],
24058    #[doc = "Rudder setpoints: nose left, center, nose right"]
24059    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24060    pub rudder: [u16; 3],
24061    #[doc = "Tail gyro mode/gain setpoints: heading hold, rate mode"]
24062    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24063    pub gyro: [u16; 2],
24064    #[doc = "Pitch curve setpoints (every 25%)"]
24065    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24066    pub pitch: [u16; 5],
24067    #[doc = "Throttle curve setpoints (every 25%)"]
24068    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
24069    pub throttle: [u16; 5],
24070}
24071impl RADIO_CALIBRATION_DATA {
24072    pub const ENCODED_LEN: usize = 42usize;
24073    pub const DEFAULT: Self = Self {
24074        aileron: [0_u16; 3usize],
24075        elevator: [0_u16; 3usize],
24076        rudder: [0_u16; 3usize],
24077        gyro: [0_u16; 2usize],
24078        pitch: [0_u16; 5usize],
24079        throttle: [0_u16; 5usize],
24080    };
24081    #[cfg(feature = "arbitrary")]
24082    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24083        use arbitrary::{Arbitrary, Unstructured};
24084        let mut buf = [0u8; 1024];
24085        rng.fill_bytes(&mut buf);
24086        let mut unstructured = Unstructured::new(&buf);
24087        Self::arbitrary(&mut unstructured).unwrap_or_default()
24088    }
24089}
24090impl Default for RADIO_CALIBRATION_DATA {
24091    fn default() -> Self {
24092        Self::DEFAULT.clone()
24093    }
24094}
24095impl MessageData for RADIO_CALIBRATION_DATA {
24096    type Message = MavMessage;
24097    const ID: u32 = 221u32;
24098    const NAME: &'static str = "RADIO_CALIBRATION";
24099    const EXTRA_CRC: u8 = 71u8;
24100    const ENCODED_LEN: usize = 42usize;
24101    fn deser(
24102        _version: MavlinkVersion,
24103        __input: &[u8],
24104    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24105        let avail_len = __input.len();
24106        let mut payload_buf = [0; Self::ENCODED_LEN];
24107        let mut buf = if avail_len < Self::ENCODED_LEN {
24108            payload_buf[0..avail_len].copy_from_slice(__input);
24109            Bytes::new(&payload_buf)
24110        } else {
24111            Bytes::new(__input)
24112        };
24113        let mut __struct = Self::default();
24114        for v in &mut __struct.aileron {
24115            let val = buf.get_u16_le();
24116            *v = val;
24117        }
24118        for v in &mut __struct.elevator {
24119            let val = buf.get_u16_le();
24120            *v = val;
24121        }
24122        for v in &mut __struct.rudder {
24123            let val = buf.get_u16_le();
24124            *v = val;
24125        }
24126        for v in &mut __struct.gyro {
24127            let val = buf.get_u16_le();
24128            *v = val;
24129        }
24130        for v in &mut __struct.pitch {
24131            let val = buf.get_u16_le();
24132            *v = val;
24133        }
24134        for v in &mut __struct.throttle {
24135            let val = buf.get_u16_le();
24136            *v = val;
24137        }
24138        Ok(__struct)
24139    }
24140    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24141        let mut __tmp = BytesMut::new(bytes);
24142        #[allow(clippy::absurd_extreme_comparisons)]
24143        #[allow(unused_comparisons)]
24144        if __tmp.remaining() < Self::ENCODED_LEN {
24145            panic!(
24146                "buffer is too small (need {} bytes, but got {})",
24147                Self::ENCODED_LEN,
24148                __tmp.remaining(),
24149            )
24150        }
24151        for val in &self.aileron {
24152            __tmp.put_u16_le(*val);
24153        }
24154        for val in &self.elevator {
24155            __tmp.put_u16_le(*val);
24156        }
24157        for val in &self.rudder {
24158            __tmp.put_u16_le(*val);
24159        }
24160        for val in &self.gyro {
24161            __tmp.put_u16_le(*val);
24162        }
24163        for val in &self.pitch {
24164            __tmp.put_u16_le(*val);
24165        }
24166        for val in &self.throttle {
24167            __tmp.put_u16_le(*val);
24168        }
24169        if matches!(version, MavlinkVersion::V2) {
24170            let len = __tmp.len();
24171            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24172        } else {
24173            __tmp.len()
24174        }
24175    }
24176}
24177#[doc = "id: 109"]
24178#[doc = "Status generated by radio and injected into MAVLink stream."]
24179#[derive(Debug, Clone, PartialEq)]
24180#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24181#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24182pub struct RADIO_STATUS_DATA {
24183    #[doc = "Count of radio packet receive errors (since boot)."]
24184    pub rxerrors: u16,
24185    #[doc = "Count of error corrected radio packets (since boot)."]
24186    pub fixed: u16,
24187    #[doc = "Local (message sender) received signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24188    pub rssi: u8,
24189    #[doc = "Remote (message receiver) signal strength indication in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24190    pub remrssi: u8,
24191    #[doc = "Remaining free transmitter buffer space."]
24192    pub txbuf: u8,
24193    #[doc = "Local background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24194    pub noise: u8,
24195    #[doc = "Remote background noise level. These are device dependent RSSI values (scale as approx 2x dB on SiK radios). Values: [0-254], UINT8_MAX: invalid/unknown."]
24196    pub remnoise: u8,
24197}
24198impl RADIO_STATUS_DATA {
24199    pub const ENCODED_LEN: usize = 9usize;
24200    pub const DEFAULT: Self = Self {
24201        rxerrors: 0_u16,
24202        fixed: 0_u16,
24203        rssi: 0_u8,
24204        remrssi: 0_u8,
24205        txbuf: 0_u8,
24206        noise: 0_u8,
24207        remnoise: 0_u8,
24208    };
24209    #[cfg(feature = "arbitrary")]
24210    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24211        use arbitrary::{Arbitrary, Unstructured};
24212        let mut buf = [0u8; 1024];
24213        rng.fill_bytes(&mut buf);
24214        let mut unstructured = Unstructured::new(&buf);
24215        Self::arbitrary(&mut unstructured).unwrap_or_default()
24216    }
24217}
24218impl Default for RADIO_STATUS_DATA {
24219    fn default() -> Self {
24220        Self::DEFAULT.clone()
24221    }
24222}
24223impl MessageData for RADIO_STATUS_DATA {
24224    type Message = MavMessage;
24225    const ID: u32 = 109u32;
24226    const NAME: &'static str = "RADIO_STATUS";
24227    const EXTRA_CRC: u8 = 185u8;
24228    const ENCODED_LEN: usize = 9usize;
24229    fn deser(
24230        _version: MavlinkVersion,
24231        __input: &[u8],
24232    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24233        let avail_len = __input.len();
24234        let mut payload_buf = [0; Self::ENCODED_LEN];
24235        let mut buf = if avail_len < Self::ENCODED_LEN {
24236            payload_buf[0..avail_len].copy_from_slice(__input);
24237            Bytes::new(&payload_buf)
24238        } else {
24239            Bytes::new(__input)
24240        };
24241        let mut __struct = Self::default();
24242        __struct.rxerrors = buf.get_u16_le();
24243        __struct.fixed = buf.get_u16_le();
24244        __struct.rssi = buf.get_u8();
24245        __struct.remrssi = buf.get_u8();
24246        __struct.txbuf = buf.get_u8();
24247        __struct.noise = buf.get_u8();
24248        __struct.remnoise = buf.get_u8();
24249        Ok(__struct)
24250    }
24251    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24252        let mut __tmp = BytesMut::new(bytes);
24253        #[allow(clippy::absurd_extreme_comparisons)]
24254        #[allow(unused_comparisons)]
24255        if __tmp.remaining() < Self::ENCODED_LEN {
24256            panic!(
24257                "buffer is too small (need {} bytes, but got {})",
24258                Self::ENCODED_LEN,
24259                __tmp.remaining(),
24260            )
24261        }
24262        __tmp.put_u16_le(self.rxerrors);
24263        __tmp.put_u16_le(self.fixed);
24264        __tmp.put_u8(self.rssi);
24265        __tmp.put_u8(self.remrssi);
24266        __tmp.put_u8(self.txbuf);
24267        __tmp.put_u8(self.noise);
24268        __tmp.put_u8(self.remnoise);
24269        if matches!(version, MavlinkVersion::V2) {
24270            let len = __tmp.len();
24271            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24272        } else {
24273            __tmp.len()
24274        }
24275    }
24276}
24277#[doc = "id: 27"]
24278#[doc = "The RAW IMU readings for a 9DOF sensor, which is identified by the id (default IMU1). This message should always contain the true raw values without any scaling to allow data capture and system debugging."]
24279#[derive(Debug, Clone, PartialEq)]
24280#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24281#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24282pub struct RAW_IMU_DATA {
24283    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24284    pub time_usec: u64,
24285    #[doc = "X acceleration (raw)"]
24286    pub xacc: i16,
24287    #[doc = "Y acceleration (raw)"]
24288    pub yacc: i16,
24289    #[doc = "Z acceleration (raw)"]
24290    pub zacc: i16,
24291    #[doc = "Angular speed around X axis (raw)"]
24292    pub xgyro: i16,
24293    #[doc = "Angular speed around Y axis (raw)"]
24294    pub ygyro: i16,
24295    #[doc = "Angular speed around Z axis (raw)"]
24296    pub zgyro: i16,
24297    #[doc = "X Magnetic field (raw)"]
24298    pub xmag: i16,
24299    #[doc = "Y Magnetic field (raw)"]
24300    pub ymag: i16,
24301    #[doc = "Z Magnetic field (raw)"]
24302    pub zmag: i16,
24303    #[doc = "Id. Ids are numbered from 0 and map to IMUs numbered from 1 (e.g. IMU1 will have a message with id=0)"]
24304    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24305    pub id: u8,
24306    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
24307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24308    pub temperature: i16,
24309}
24310impl RAW_IMU_DATA {
24311    pub const ENCODED_LEN: usize = 29usize;
24312    pub const DEFAULT: Self = Self {
24313        time_usec: 0_u64,
24314        xacc: 0_i16,
24315        yacc: 0_i16,
24316        zacc: 0_i16,
24317        xgyro: 0_i16,
24318        ygyro: 0_i16,
24319        zgyro: 0_i16,
24320        xmag: 0_i16,
24321        ymag: 0_i16,
24322        zmag: 0_i16,
24323        id: 0_u8,
24324        temperature: 0_i16,
24325    };
24326    #[cfg(feature = "arbitrary")]
24327    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24328        use arbitrary::{Arbitrary, Unstructured};
24329        let mut buf = [0u8; 1024];
24330        rng.fill_bytes(&mut buf);
24331        let mut unstructured = Unstructured::new(&buf);
24332        Self::arbitrary(&mut unstructured).unwrap_or_default()
24333    }
24334}
24335impl Default for RAW_IMU_DATA {
24336    fn default() -> Self {
24337        Self::DEFAULT.clone()
24338    }
24339}
24340impl MessageData for RAW_IMU_DATA {
24341    type Message = MavMessage;
24342    const ID: u32 = 27u32;
24343    const NAME: &'static str = "RAW_IMU";
24344    const EXTRA_CRC: u8 = 144u8;
24345    const ENCODED_LEN: usize = 29usize;
24346    fn deser(
24347        _version: MavlinkVersion,
24348        __input: &[u8],
24349    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24350        let avail_len = __input.len();
24351        let mut payload_buf = [0; Self::ENCODED_LEN];
24352        let mut buf = if avail_len < Self::ENCODED_LEN {
24353            payload_buf[0..avail_len].copy_from_slice(__input);
24354            Bytes::new(&payload_buf)
24355        } else {
24356            Bytes::new(__input)
24357        };
24358        let mut __struct = Self::default();
24359        __struct.time_usec = buf.get_u64_le();
24360        __struct.xacc = buf.get_i16_le();
24361        __struct.yacc = buf.get_i16_le();
24362        __struct.zacc = buf.get_i16_le();
24363        __struct.xgyro = buf.get_i16_le();
24364        __struct.ygyro = buf.get_i16_le();
24365        __struct.zgyro = buf.get_i16_le();
24366        __struct.xmag = buf.get_i16_le();
24367        __struct.ymag = buf.get_i16_le();
24368        __struct.zmag = buf.get_i16_le();
24369        __struct.id = buf.get_u8();
24370        __struct.temperature = buf.get_i16_le();
24371        Ok(__struct)
24372    }
24373    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24374        let mut __tmp = BytesMut::new(bytes);
24375        #[allow(clippy::absurd_extreme_comparisons)]
24376        #[allow(unused_comparisons)]
24377        if __tmp.remaining() < Self::ENCODED_LEN {
24378            panic!(
24379                "buffer is too small (need {} bytes, but got {})",
24380                Self::ENCODED_LEN,
24381                __tmp.remaining(),
24382            )
24383        }
24384        __tmp.put_u64_le(self.time_usec);
24385        __tmp.put_i16_le(self.xacc);
24386        __tmp.put_i16_le(self.yacc);
24387        __tmp.put_i16_le(self.zacc);
24388        __tmp.put_i16_le(self.xgyro);
24389        __tmp.put_i16_le(self.ygyro);
24390        __tmp.put_i16_le(self.zgyro);
24391        __tmp.put_i16_le(self.xmag);
24392        __tmp.put_i16_le(self.ymag);
24393        __tmp.put_i16_le(self.zmag);
24394        __tmp.put_u8(self.id);
24395        __tmp.put_i16_le(self.temperature);
24396        if matches!(version, MavlinkVersion::V2) {
24397            let len = __tmp.len();
24398            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24399        } else {
24400            __tmp.len()
24401        }
24402    }
24403}
24404#[doc = "id: 28"]
24405#[doc = "The RAW pressure readings for the typical setup of one absolute pressure and one differential pressure sensor. The sensor values should be the raw, UNSCALED ADC values."]
24406#[derive(Debug, Clone, PartialEq)]
24407#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24408#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24409pub struct RAW_PRESSURE_DATA {
24410    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
24411    pub time_usec: u64,
24412    #[doc = "Absolute pressure (raw)"]
24413    pub press_abs: i16,
24414    #[doc = "Differential pressure 1 (raw, 0 if nonexistent)"]
24415    pub press_diff1: i16,
24416    #[doc = "Differential pressure 2 (raw, 0 if nonexistent)"]
24417    pub press_diff2: i16,
24418    #[doc = "Raw Temperature measurement (raw)"]
24419    pub temperature: i16,
24420}
24421impl RAW_PRESSURE_DATA {
24422    pub const ENCODED_LEN: usize = 16usize;
24423    pub const DEFAULT: Self = Self {
24424        time_usec: 0_u64,
24425        press_abs: 0_i16,
24426        press_diff1: 0_i16,
24427        press_diff2: 0_i16,
24428        temperature: 0_i16,
24429    };
24430    #[cfg(feature = "arbitrary")]
24431    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24432        use arbitrary::{Arbitrary, Unstructured};
24433        let mut buf = [0u8; 1024];
24434        rng.fill_bytes(&mut buf);
24435        let mut unstructured = Unstructured::new(&buf);
24436        Self::arbitrary(&mut unstructured).unwrap_or_default()
24437    }
24438}
24439impl Default for RAW_PRESSURE_DATA {
24440    fn default() -> Self {
24441        Self::DEFAULT.clone()
24442    }
24443}
24444impl MessageData for RAW_PRESSURE_DATA {
24445    type Message = MavMessage;
24446    const ID: u32 = 28u32;
24447    const NAME: &'static str = "RAW_PRESSURE";
24448    const EXTRA_CRC: u8 = 67u8;
24449    const ENCODED_LEN: usize = 16usize;
24450    fn deser(
24451        _version: MavlinkVersion,
24452        __input: &[u8],
24453    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24454        let avail_len = __input.len();
24455        let mut payload_buf = [0; Self::ENCODED_LEN];
24456        let mut buf = if avail_len < Self::ENCODED_LEN {
24457            payload_buf[0..avail_len].copy_from_slice(__input);
24458            Bytes::new(&payload_buf)
24459        } else {
24460            Bytes::new(__input)
24461        };
24462        let mut __struct = Self::default();
24463        __struct.time_usec = buf.get_u64_le();
24464        __struct.press_abs = buf.get_i16_le();
24465        __struct.press_diff1 = buf.get_i16_le();
24466        __struct.press_diff2 = buf.get_i16_le();
24467        __struct.temperature = buf.get_i16_le();
24468        Ok(__struct)
24469    }
24470    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24471        let mut __tmp = BytesMut::new(bytes);
24472        #[allow(clippy::absurd_extreme_comparisons)]
24473        #[allow(unused_comparisons)]
24474        if __tmp.remaining() < Self::ENCODED_LEN {
24475            panic!(
24476                "buffer is too small (need {} bytes, but got {})",
24477                Self::ENCODED_LEN,
24478                __tmp.remaining(),
24479            )
24480        }
24481        __tmp.put_u64_le(self.time_usec);
24482        __tmp.put_i16_le(self.press_abs);
24483        __tmp.put_i16_le(self.press_diff1);
24484        __tmp.put_i16_le(self.press_diff2);
24485        __tmp.put_i16_le(self.temperature);
24486        if matches!(version, MavlinkVersion::V2) {
24487            let len = __tmp.len();
24488            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24489        } else {
24490            __tmp.len()
24491        }
24492    }
24493}
24494#[doc = "id: 339"]
24495#[doc = "RPM sensor data message."]
24496#[derive(Debug, Clone, PartialEq)]
24497#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24498#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24499pub struct RAW_RPM_DATA {
24500    #[doc = "Indicated rate"]
24501    pub frequency: f32,
24502    #[doc = "Index of this RPM sensor (0-indexed)"]
24503    pub index: u8,
24504}
24505impl RAW_RPM_DATA {
24506    pub const ENCODED_LEN: usize = 5usize;
24507    pub const DEFAULT: Self = Self {
24508        frequency: 0.0_f32,
24509        index: 0_u8,
24510    };
24511    #[cfg(feature = "arbitrary")]
24512    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24513        use arbitrary::{Arbitrary, Unstructured};
24514        let mut buf = [0u8; 1024];
24515        rng.fill_bytes(&mut buf);
24516        let mut unstructured = Unstructured::new(&buf);
24517        Self::arbitrary(&mut unstructured).unwrap_or_default()
24518    }
24519}
24520impl Default for RAW_RPM_DATA {
24521    fn default() -> Self {
24522        Self::DEFAULT.clone()
24523    }
24524}
24525impl MessageData for RAW_RPM_DATA {
24526    type Message = MavMessage;
24527    const ID: u32 = 339u32;
24528    const NAME: &'static str = "RAW_RPM";
24529    const EXTRA_CRC: u8 = 199u8;
24530    const ENCODED_LEN: usize = 5usize;
24531    fn deser(
24532        _version: MavlinkVersion,
24533        __input: &[u8],
24534    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24535        let avail_len = __input.len();
24536        let mut payload_buf = [0; Self::ENCODED_LEN];
24537        let mut buf = if avail_len < Self::ENCODED_LEN {
24538            payload_buf[0..avail_len].copy_from_slice(__input);
24539            Bytes::new(&payload_buf)
24540        } else {
24541            Bytes::new(__input)
24542        };
24543        let mut __struct = Self::default();
24544        __struct.frequency = buf.get_f32_le();
24545        __struct.index = buf.get_u8();
24546        Ok(__struct)
24547    }
24548    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24549        let mut __tmp = BytesMut::new(bytes);
24550        #[allow(clippy::absurd_extreme_comparisons)]
24551        #[allow(unused_comparisons)]
24552        if __tmp.remaining() < Self::ENCODED_LEN {
24553            panic!(
24554                "buffer is too small (need {} bytes, but got {})",
24555                Self::ENCODED_LEN,
24556                __tmp.remaining(),
24557            )
24558        }
24559        __tmp.put_f32_le(self.frequency);
24560        __tmp.put_u8(self.index);
24561        if matches!(version, MavlinkVersion::V2) {
24562            let len = __tmp.len();
24563            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24564        } else {
24565            __tmp.len()
24566        }
24567    }
24568}
24569#[doc = "id: 65"]
24570#[doc = "The PPM values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%.  A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24571#[derive(Debug, Clone, PartialEq)]
24572#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24573#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24574pub struct RC_CHANNELS_DATA {
24575    #[doc = "Timestamp (time since system boot)."]
24576    pub time_boot_ms: u32,
24577    #[doc = "RC channel 1 value."]
24578    pub chan1_raw: u16,
24579    #[doc = "RC channel 2 value."]
24580    pub chan2_raw: u16,
24581    #[doc = "RC channel 3 value."]
24582    pub chan3_raw: u16,
24583    #[doc = "RC channel 4 value."]
24584    pub chan4_raw: u16,
24585    #[doc = "RC channel 5 value."]
24586    pub chan5_raw: u16,
24587    #[doc = "RC channel 6 value."]
24588    pub chan6_raw: u16,
24589    #[doc = "RC channel 7 value."]
24590    pub chan7_raw: u16,
24591    #[doc = "RC channel 8 value."]
24592    pub chan8_raw: u16,
24593    #[doc = "RC channel 9 value."]
24594    pub chan9_raw: u16,
24595    #[doc = "RC channel 10 value."]
24596    pub chan10_raw: u16,
24597    #[doc = "RC channel 11 value."]
24598    pub chan11_raw: u16,
24599    #[doc = "RC channel 12 value."]
24600    pub chan12_raw: u16,
24601    #[doc = "RC channel 13 value."]
24602    pub chan13_raw: u16,
24603    #[doc = "RC channel 14 value."]
24604    pub chan14_raw: u16,
24605    #[doc = "RC channel 15 value."]
24606    pub chan15_raw: u16,
24607    #[doc = "RC channel 16 value."]
24608    pub chan16_raw: u16,
24609    #[doc = "RC channel 17 value."]
24610    pub chan17_raw: u16,
24611    #[doc = "RC channel 18 value."]
24612    pub chan18_raw: u16,
24613    #[doc = "Total number of RC channels being received. This can be larger than 18, indicating that more channels are available but not given in this message. This value should be 0 when no RC channels are available."]
24614    pub chancount: u8,
24615    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24616    pub rssi: u8,
24617}
24618impl RC_CHANNELS_DATA {
24619    pub const ENCODED_LEN: usize = 42usize;
24620    pub const DEFAULT: Self = Self {
24621        time_boot_ms: 0_u32,
24622        chan1_raw: 0_u16,
24623        chan2_raw: 0_u16,
24624        chan3_raw: 0_u16,
24625        chan4_raw: 0_u16,
24626        chan5_raw: 0_u16,
24627        chan6_raw: 0_u16,
24628        chan7_raw: 0_u16,
24629        chan8_raw: 0_u16,
24630        chan9_raw: 0_u16,
24631        chan10_raw: 0_u16,
24632        chan11_raw: 0_u16,
24633        chan12_raw: 0_u16,
24634        chan13_raw: 0_u16,
24635        chan14_raw: 0_u16,
24636        chan15_raw: 0_u16,
24637        chan16_raw: 0_u16,
24638        chan17_raw: 0_u16,
24639        chan18_raw: 0_u16,
24640        chancount: 0_u8,
24641        rssi: 0_u8,
24642    };
24643    #[cfg(feature = "arbitrary")]
24644    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24645        use arbitrary::{Arbitrary, Unstructured};
24646        let mut buf = [0u8; 1024];
24647        rng.fill_bytes(&mut buf);
24648        let mut unstructured = Unstructured::new(&buf);
24649        Self::arbitrary(&mut unstructured).unwrap_or_default()
24650    }
24651}
24652impl Default for RC_CHANNELS_DATA {
24653    fn default() -> Self {
24654        Self::DEFAULT.clone()
24655    }
24656}
24657impl MessageData for RC_CHANNELS_DATA {
24658    type Message = MavMessage;
24659    const ID: u32 = 65u32;
24660    const NAME: &'static str = "RC_CHANNELS";
24661    const EXTRA_CRC: u8 = 118u8;
24662    const ENCODED_LEN: usize = 42usize;
24663    fn deser(
24664        _version: MavlinkVersion,
24665        __input: &[u8],
24666    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24667        let avail_len = __input.len();
24668        let mut payload_buf = [0; Self::ENCODED_LEN];
24669        let mut buf = if avail_len < Self::ENCODED_LEN {
24670            payload_buf[0..avail_len].copy_from_slice(__input);
24671            Bytes::new(&payload_buf)
24672        } else {
24673            Bytes::new(__input)
24674        };
24675        let mut __struct = Self::default();
24676        __struct.time_boot_ms = buf.get_u32_le();
24677        __struct.chan1_raw = buf.get_u16_le();
24678        __struct.chan2_raw = buf.get_u16_le();
24679        __struct.chan3_raw = buf.get_u16_le();
24680        __struct.chan4_raw = buf.get_u16_le();
24681        __struct.chan5_raw = buf.get_u16_le();
24682        __struct.chan6_raw = buf.get_u16_le();
24683        __struct.chan7_raw = buf.get_u16_le();
24684        __struct.chan8_raw = buf.get_u16_le();
24685        __struct.chan9_raw = buf.get_u16_le();
24686        __struct.chan10_raw = buf.get_u16_le();
24687        __struct.chan11_raw = buf.get_u16_le();
24688        __struct.chan12_raw = buf.get_u16_le();
24689        __struct.chan13_raw = buf.get_u16_le();
24690        __struct.chan14_raw = buf.get_u16_le();
24691        __struct.chan15_raw = buf.get_u16_le();
24692        __struct.chan16_raw = buf.get_u16_le();
24693        __struct.chan17_raw = buf.get_u16_le();
24694        __struct.chan18_raw = buf.get_u16_le();
24695        __struct.chancount = buf.get_u8();
24696        __struct.rssi = buf.get_u8();
24697        Ok(__struct)
24698    }
24699    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24700        let mut __tmp = BytesMut::new(bytes);
24701        #[allow(clippy::absurd_extreme_comparisons)]
24702        #[allow(unused_comparisons)]
24703        if __tmp.remaining() < Self::ENCODED_LEN {
24704            panic!(
24705                "buffer is too small (need {} bytes, but got {})",
24706                Self::ENCODED_LEN,
24707                __tmp.remaining(),
24708            )
24709        }
24710        __tmp.put_u32_le(self.time_boot_ms);
24711        __tmp.put_u16_le(self.chan1_raw);
24712        __tmp.put_u16_le(self.chan2_raw);
24713        __tmp.put_u16_le(self.chan3_raw);
24714        __tmp.put_u16_le(self.chan4_raw);
24715        __tmp.put_u16_le(self.chan5_raw);
24716        __tmp.put_u16_le(self.chan6_raw);
24717        __tmp.put_u16_le(self.chan7_raw);
24718        __tmp.put_u16_le(self.chan8_raw);
24719        __tmp.put_u16_le(self.chan9_raw);
24720        __tmp.put_u16_le(self.chan10_raw);
24721        __tmp.put_u16_le(self.chan11_raw);
24722        __tmp.put_u16_le(self.chan12_raw);
24723        __tmp.put_u16_le(self.chan13_raw);
24724        __tmp.put_u16_le(self.chan14_raw);
24725        __tmp.put_u16_le(self.chan15_raw);
24726        __tmp.put_u16_le(self.chan16_raw);
24727        __tmp.put_u16_le(self.chan17_raw);
24728        __tmp.put_u16_le(self.chan18_raw);
24729        __tmp.put_u8(self.chancount);
24730        __tmp.put_u8(self.rssi);
24731        if matches!(version, MavlinkVersion::V2) {
24732            let len = __tmp.len();
24733            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24734        } else {
24735            __tmp.len()
24736        }
24737    }
24738}
24739#[doc = "id: 70"]
24740#[doc = "The RAW values of the RC channels sent to the MAV to override info received from the RC radio. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. Individual receivers/transmitters might violate this specification.  Note carefully the semantic differences between the first 8 channels and the subsequent channels."]
24741#[derive(Debug, Clone, PartialEq)]
24742#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24743#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24744pub struct RC_CHANNELS_OVERRIDE_DATA {
24745    #[doc = "RC channel 1 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24746    pub chan1_raw: u16,
24747    #[doc = "RC channel 2 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24748    pub chan2_raw: u16,
24749    #[doc = "RC channel 3 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24750    pub chan3_raw: u16,
24751    #[doc = "RC channel 4 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24752    pub chan4_raw: u16,
24753    #[doc = "RC channel 5 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24754    pub chan5_raw: u16,
24755    #[doc = "RC channel 6 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24756    pub chan6_raw: u16,
24757    #[doc = "RC channel 7 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24758    pub chan7_raw: u16,
24759    #[doc = "RC channel 8 value. A value of UINT16_MAX means to ignore this field. A value of 0 means to release this channel back to the RC radio."]
24760    pub chan8_raw: u16,
24761    #[doc = "System ID"]
24762    pub target_system: u8,
24763    #[doc = "Component ID"]
24764    pub target_component: u8,
24765    #[doc = "RC channel 9 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24766    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24767    pub chan9_raw: u16,
24768    #[doc = "RC channel 10 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24769    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24770    pub chan10_raw: u16,
24771    #[doc = "RC channel 11 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24772    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24773    pub chan11_raw: u16,
24774    #[doc = "RC channel 12 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24775    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24776    pub chan12_raw: u16,
24777    #[doc = "RC channel 13 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24778    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24779    pub chan13_raw: u16,
24780    #[doc = "RC channel 14 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24781    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24782    pub chan14_raw: u16,
24783    #[doc = "RC channel 15 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24784    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24785    pub chan15_raw: u16,
24786    #[doc = "RC channel 16 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24787    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24788    pub chan16_raw: u16,
24789    #[doc = "RC channel 17 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24790    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24791    pub chan17_raw: u16,
24792    #[doc = "RC channel 18 value. A value of 0 or UINT16_MAX means to ignore this field. A value of UINT16_MAX-1 means to release this channel back to the RC radio."]
24793    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
24794    pub chan18_raw: u16,
24795}
24796impl RC_CHANNELS_OVERRIDE_DATA {
24797    pub const ENCODED_LEN: usize = 38usize;
24798    pub const DEFAULT: Self = Self {
24799        chan1_raw: 0_u16,
24800        chan2_raw: 0_u16,
24801        chan3_raw: 0_u16,
24802        chan4_raw: 0_u16,
24803        chan5_raw: 0_u16,
24804        chan6_raw: 0_u16,
24805        chan7_raw: 0_u16,
24806        chan8_raw: 0_u16,
24807        target_system: 0_u8,
24808        target_component: 0_u8,
24809        chan9_raw: 0_u16,
24810        chan10_raw: 0_u16,
24811        chan11_raw: 0_u16,
24812        chan12_raw: 0_u16,
24813        chan13_raw: 0_u16,
24814        chan14_raw: 0_u16,
24815        chan15_raw: 0_u16,
24816        chan16_raw: 0_u16,
24817        chan17_raw: 0_u16,
24818        chan18_raw: 0_u16,
24819    };
24820    #[cfg(feature = "arbitrary")]
24821    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24822        use arbitrary::{Arbitrary, Unstructured};
24823        let mut buf = [0u8; 1024];
24824        rng.fill_bytes(&mut buf);
24825        let mut unstructured = Unstructured::new(&buf);
24826        Self::arbitrary(&mut unstructured).unwrap_or_default()
24827    }
24828}
24829impl Default for RC_CHANNELS_OVERRIDE_DATA {
24830    fn default() -> Self {
24831        Self::DEFAULT.clone()
24832    }
24833}
24834impl MessageData for RC_CHANNELS_OVERRIDE_DATA {
24835    type Message = MavMessage;
24836    const ID: u32 = 70u32;
24837    const NAME: &'static str = "RC_CHANNELS_OVERRIDE";
24838    const EXTRA_CRC: u8 = 124u8;
24839    const ENCODED_LEN: usize = 38usize;
24840    fn deser(
24841        _version: MavlinkVersion,
24842        __input: &[u8],
24843    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24844        let avail_len = __input.len();
24845        let mut payload_buf = [0; Self::ENCODED_LEN];
24846        let mut buf = if avail_len < Self::ENCODED_LEN {
24847            payload_buf[0..avail_len].copy_from_slice(__input);
24848            Bytes::new(&payload_buf)
24849        } else {
24850            Bytes::new(__input)
24851        };
24852        let mut __struct = Self::default();
24853        __struct.chan1_raw = buf.get_u16_le();
24854        __struct.chan2_raw = buf.get_u16_le();
24855        __struct.chan3_raw = buf.get_u16_le();
24856        __struct.chan4_raw = buf.get_u16_le();
24857        __struct.chan5_raw = buf.get_u16_le();
24858        __struct.chan6_raw = buf.get_u16_le();
24859        __struct.chan7_raw = buf.get_u16_le();
24860        __struct.chan8_raw = buf.get_u16_le();
24861        __struct.target_system = buf.get_u8();
24862        __struct.target_component = buf.get_u8();
24863        __struct.chan9_raw = buf.get_u16_le();
24864        __struct.chan10_raw = buf.get_u16_le();
24865        __struct.chan11_raw = buf.get_u16_le();
24866        __struct.chan12_raw = buf.get_u16_le();
24867        __struct.chan13_raw = buf.get_u16_le();
24868        __struct.chan14_raw = buf.get_u16_le();
24869        __struct.chan15_raw = buf.get_u16_le();
24870        __struct.chan16_raw = buf.get_u16_le();
24871        __struct.chan17_raw = buf.get_u16_le();
24872        __struct.chan18_raw = buf.get_u16_le();
24873        Ok(__struct)
24874    }
24875    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
24876        let mut __tmp = BytesMut::new(bytes);
24877        #[allow(clippy::absurd_extreme_comparisons)]
24878        #[allow(unused_comparisons)]
24879        if __tmp.remaining() < Self::ENCODED_LEN {
24880            panic!(
24881                "buffer is too small (need {} bytes, but got {})",
24882                Self::ENCODED_LEN,
24883                __tmp.remaining(),
24884            )
24885        }
24886        __tmp.put_u16_le(self.chan1_raw);
24887        __tmp.put_u16_le(self.chan2_raw);
24888        __tmp.put_u16_le(self.chan3_raw);
24889        __tmp.put_u16_le(self.chan4_raw);
24890        __tmp.put_u16_le(self.chan5_raw);
24891        __tmp.put_u16_le(self.chan6_raw);
24892        __tmp.put_u16_le(self.chan7_raw);
24893        __tmp.put_u16_le(self.chan8_raw);
24894        __tmp.put_u8(self.target_system);
24895        __tmp.put_u8(self.target_component);
24896        __tmp.put_u16_le(self.chan9_raw);
24897        __tmp.put_u16_le(self.chan10_raw);
24898        __tmp.put_u16_le(self.chan11_raw);
24899        __tmp.put_u16_le(self.chan12_raw);
24900        __tmp.put_u16_le(self.chan13_raw);
24901        __tmp.put_u16_le(self.chan14_raw);
24902        __tmp.put_u16_le(self.chan15_raw);
24903        __tmp.put_u16_le(self.chan16_raw);
24904        __tmp.put_u16_le(self.chan17_raw);
24905        __tmp.put_u16_le(self.chan18_raw);
24906        if matches!(version, MavlinkVersion::V2) {
24907            let len = __tmp.len();
24908            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
24909        } else {
24910            __tmp.len()
24911        }
24912    }
24913}
24914#[doc = "id: 35"]
24915#[doc = "The RAW values of the RC channels received. The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%. A value of UINT16_MAX implies the channel is unused. Individual receivers/transmitters might violate this specification."]
24916#[derive(Debug, Clone, PartialEq)]
24917#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
24918#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
24919pub struct RC_CHANNELS_RAW_DATA {
24920    #[doc = "Timestamp (time since system boot)."]
24921    pub time_boot_ms: u32,
24922    #[doc = "RC channel 1 value."]
24923    pub chan1_raw: u16,
24924    #[doc = "RC channel 2 value."]
24925    pub chan2_raw: u16,
24926    #[doc = "RC channel 3 value."]
24927    pub chan3_raw: u16,
24928    #[doc = "RC channel 4 value."]
24929    pub chan4_raw: u16,
24930    #[doc = "RC channel 5 value."]
24931    pub chan5_raw: u16,
24932    #[doc = "RC channel 6 value."]
24933    pub chan6_raw: u16,
24934    #[doc = "RC channel 7 value."]
24935    pub chan7_raw: u16,
24936    #[doc = "RC channel 8 value."]
24937    pub chan8_raw: u16,
24938    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
24939    pub port: u8,
24940    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
24941    pub rssi: u8,
24942}
24943impl RC_CHANNELS_RAW_DATA {
24944    pub const ENCODED_LEN: usize = 22usize;
24945    pub const DEFAULT: Self = Self {
24946        time_boot_ms: 0_u32,
24947        chan1_raw: 0_u16,
24948        chan2_raw: 0_u16,
24949        chan3_raw: 0_u16,
24950        chan4_raw: 0_u16,
24951        chan5_raw: 0_u16,
24952        chan6_raw: 0_u16,
24953        chan7_raw: 0_u16,
24954        chan8_raw: 0_u16,
24955        port: 0_u8,
24956        rssi: 0_u8,
24957    };
24958    #[cfg(feature = "arbitrary")]
24959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
24960        use arbitrary::{Arbitrary, Unstructured};
24961        let mut buf = [0u8; 1024];
24962        rng.fill_bytes(&mut buf);
24963        let mut unstructured = Unstructured::new(&buf);
24964        Self::arbitrary(&mut unstructured).unwrap_or_default()
24965    }
24966}
24967impl Default for RC_CHANNELS_RAW_DATA {
24968    fn default() -> Self {
24969        Self::DEFAULT.clone()
24970    }
24971}
24972impl MessageData for RC_CHANNELS_RAW_DATA {
24973    type Message = MavMessage;
24974    const ID: u32 = 35u32;
24975    const NAME: &'static str = "RC_CHANNELS_RAW";
24976    const EXTRA_CRC: u8 = 244u8;
24977    const ENCODED_LEN: usize = 22usize;
24978    fn deser(
24979        _version: MavlinkVersion,
24980        __input: &[u8],
24981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
24982        let avail_len = __input.len();
24983        let mut payload_buf = [0; Self::ENCODED_LEN];
24984        let mut buf = if avail_len < Self::ENCODED_LEN {
24985            payload_buf[0..avail_len].copy_from_slice(__input);
24986            Bytes::new(&payload_buf)
24987        } else {
24988            Bytes::new(__input)
24989        };
24990        let mut __struct = Self::default();
24991        __struct.time_boot_ms = buf.get_u32_le();
24992        __struct.chan1_raw = buf.get_u16_le();
24993        __struct.chan2_raw = buf.get_u16_le();
24994        __struct.chan3_raw = buf.get_u16_le();
24995        __struct.chan4_raw = buf.get_u16_le();
24996        __struct.chan5_raw = buf.get_u16_le();
24997        __struct.chan6_raw = buf.get_u16_le();
24998        __struct.chan7_raw = buf.get_u16_le();
24999        __struct.chan8_raw = buf.get_u16_le();
25000        __struct.port = buf.get_u8();
25001        __struct.rssi = buf.get_u8();
25002        Ok(__struct)
25003    }
25004    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25005        let mut __tmp = BytesMut::new(bytes);
25006        #[allow(clippy::absurd_extreme_comparisons)]
25007        #[allow(unused_comparisons)]
25008        if __tmp.remaining() < Self::ENCODED_LEN {
25009            panic!(
25010                "buffer is too small (need {} bytes, but got {})",
25011                Self::ENCODED_LEN,
25012                __tmp.remaining(),
25013            )
25014        }
25015        __tmp.put_u32_le(self.time_boot_ms);
25016        __tmp.put_u16_le(self.chan1_raw);
25017        __tmp.put_u16_le(self.chan2_raw);
25018        __tmp.put_u16_le(self.chan3_raw);
25019        __tmp.put_u16_le(self.chan4_raw);
25020        __tmp.put_u16_le(self.chan5_raw);
25021        __tmp.put_u16_le(self.chan6_raw);
25022        __tmp.put_u16_le(self.chan7_raw);
25023        __tmp.put_u16_le(self.chan8_raw);
25024        __tmp.put_u8(self.port);
25025        __tmp.put_u8(self.rssi);
25026        if matches!(version, MavlinkVersion::V2) {
25027            let len = __tmp.len();
25028            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25029        } else {
25030            __tmp.len()
25031        }
25032    }
25033}
25034#[doc = "id: 34"]
25035#[doc = "The scaled values of the RC channels received: (-100%) -10000, (0%) 0, (100%) 10000. Channels that are inactive should be set to INT16_MAX."]
25036#[derive(Debug, Clone, PartialEq)]
25037#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25038#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25039pub struct RC_CHANNELS_SCALED_DATA {
25040    #[doc = "Timestamp (time since system boot)."]
25041    pub time_boot_ms: u32,
25042    #[doc = "RC channel 1 value scaled."]
25043    pub chan1_scaled: i16,
25044    #[doc = "RC channel 2 value scaled."]
25045    pub chan2_scaled: i16,
25046    #[doc = "RC channel 3 value scaled."]
25047    pub chan3_scaled: i16,
25048    #[doc = "RC channel 4 value scaled."]
25049    pub chan4_scaled: i16,
25050    #[doc = "RC channel 5 value scaled."]
25051    pub chan5_scaled: i16,
25052    #[doc = "RC channel 6 value scaled."]
25053    pub chan6_scaled: i16,
25054    #[doc = "RC channel 7 value scaled."]
25055    pub chan7_scaled: i16,
25056    #[doc = "RC channel 8 value scaled."]
25057    pub chan8_scaled: i16,
25058    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
25059    pub port: u8,
25060    #[doc = "Receive signal strength indicator in device-dependent units/scale. Values: [0-254], UINT8_MAX: invalid/unknown."]
25061    pub rssi: u8,
25062}
25063impl RC_CHANNELS_SCALED_DATA {
25064    pub const ENCODED_LEN: usize = 22usize;
25065    pub const DEFAULT: Self = Self {
25066        time_boot_ms: 0_u32,
25067        chan1_scaled: 0_i16,
25068        chan2_scaled: 0_i16,
25069        chan3_scaled: 0_i16,
25070        chan4_scaled: 0_i16,
25071        chan5_scaled: 0_i16,
25072        chan6_scaled: 0_i16,
25073        chan7_scaled: 0_i16,
25074        chan8_scaled: 0_i16,
25075        port: 0_u8,
25076        rssi: 0_u8,
25077    };
25078    #[cfg(feature = "arbitrary")]
25079    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25080        use arbitrary::{Arbitrary, Unstructured};
25081        let mut buf = [0u8; 1024];
25082        rng.fill_bytes(&mut buf);
25083        let mut unstructured = Unstructured::new(&buf);
25084        Self::arbitrary(&mut unstructured).unwrap_or_default()
25085    }
25086}
25087impl Default for RC_CHANNELS_SCALED_DATA {
25088    fn default() -> Self {
25089        Self::DEFAULT.clone()
25090    }
25091}
25092impl MessageData for RC_CHANNELS_SCALED_DATA {
25093    type Message = MavMessage;
25094    const ID: u32 = 34u32;
25095    const NAME: &'static str = "RC_CHANNELS_SCALED";
25096    const EXTRA_CRC: u8 = 237u8;
25097    const ENCODED_LEN: usize = 22usize;
25098    fn deser(
25099        _version: MavlinkVersion,
25100        __input: &[u8],
25101    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25102        let avail_len = __input.len();
25103        let mut payload_buf = [0; Self::ENCODED_LEN];
25104        let mut buf = if avail_len < Self::ENCODED_LEN {
25105            payload_buf[0..avail_len].copy_from_slice(__input);
25106            Bytes::new(&payload_buf)
25107        } else {
25108            Bytes::new(__input)
25109        };
25110        let mut __struct = Self::default();
25111        __struct.time_boot_ms = buf.get_u32_le();
25112        __struct.chan1_scaled = buf.get_i16_le();
25113        __struct.chan2_scaled = buf.get_i16_le();
25114        __struct.chan3_scaled = buf.get_i16_le();
25115        __struct.chan4_scaled = buf.get_i16_le();
25116        __struct.chan5_scaled = buf.get_i16_le();
25117        __struct.chan6_scaled = buf.get_i16_le();
25118        __struct.chan7_scaled = buf.get_i16_le();
25119        __struct.chan8_scaled = buf.get_i16_le();
25120        __struct.port = buf.get_u8();
25121        __struct.rssi = buf.get_u8();
25122        Ok(__struct)
25123    }
25124    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25125        let mut __tmp = BytesMut::new(bytes);
25126        #[allow(clippy::absurd_extreme_comparisons)]
25127        #[allow(unused_comparisons)]
25128        if __tmp.remaining() < Self::ENCODED_LEN {
25129            panic!(
25130                "buffer is too small (need {} bytes, but got {})",
25131                Self::ENCODED_LEN,
25132                __tmp.remaining(),
25133            )
25134        }
25135        __tmp.put_u32_le(self.time_boot_ms);
25136        __tmp.put_i16_le(self.chan1_scaled);
25137        __tmp.put_i16_le(self.chan2_scaled);
25138        __tmp.put_i16_le(self.chan3_scaled);
25139        __tmp.put_i16_le(self.chan4_scaled);
25140        __tmp.put_i16_le(self.chan5_scaled);
25141        __tmp.put_i16_le(self.chan6_scaled);
25142        __tmp.put_i16_le(self.chan7_scaled);
25143        __tmp.put_i16_le(self.chan8_scaled);
25144        __tmp.put_u8(self.port);
25145        __tmp.put_u8(self.rssi);
25146        if matches!(version, MavlinkVersion::V2) {
25147            let len = __tmp.len();
25148            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25149        } else {
25150            __tmp.len()
25151        }
25152    }
25153}
25154#[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
25155#[doc = "id: 66"]
25156#[doc = "Request a data stream."]
25157#[derive(Debug, Clone, PartialEq)]
25158#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25159#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25160pub struct REQUEST_DATA_STREAM_DATA {
25161    #[doc = "The requested message rate"]
25162    pub req_message_rate: u16,
25163    #[doc = "The target requested to send the message stream."]
25164    pub target_system: u8,
25165    #[doc = "The target requested to send the message stream."]
25166    pub target_component: u8,
25167    #[doc = "The ID of the requested data stream"]
25168    pub req_stream_id: u8,
25169    #[doc = "1 to start sending, 0 to stop sending."]
25170    pub start_stop: u8,
25171}
25172impl REQUEST_DATA_STREAM_DATA {
25173    pub const ENCODED_LEN: usize = 6usize;
25174    pub const DEFAULT: Self = Self {
25175        req_message_rate: 0_u16,
25176        target_system: 0_u8,
25177        target_component: 0_u8,
25178        req_stream_id: 0_u8,
25179        start_stop: 0_u8,
25180    };
25181    #[cfg(feature = "arbitrary")]
25182    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25183        use arbitrary::{Arbitrary, Unstructured};
25184        let mut buf = [0u8; 1024];
25185        rng.fill_bytes(&mut buf);
25186        let mut unstructured = Unstructured::new(&buf);
25187        Self::arbitrary(&mut unstructured).unwrap_or_default()
25188    }
25189}
25190impl Default for REQUEST_DATA_STREAM_DATA {
25191    fn default() -> Self {
25192        Self::DEFAULT.clone()
25193    }
25194}
25195impl MessageData for REQUEST_DATA_STREAM_DATA {
25196    type Message = MavMessage;
25197    const ID: u32 = 66u32;
25198    const NAME: &'static str = "REQUEST_DATA_STREAM";
25199    const EXTRA_CRC: u8 = 148u8;
25200    const ENCODED_LEN: usize = 6usize;
25201    fn deser(
25202        _version: MavlinkVersion,
25203        __input: &[u8],
25204    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25205        let avail_len = __input.len();
25206        let mut payload_buf = [0; Self::ENCODED_LEN];
25207        let mut buf = if avail_len < Self::ENCODED_LEN {
25208            payload_buf[0..avail_len].copy_from_slice(__input);
25209            Bytes::new(&payload_buf)
25210        } else {
25211            Bytes::new(__input)
25212        };
25213        let mut __struct = Self::default();
25214        __struct.req_message_rate = buf.get_u16_le();
25215        __struct.target_system = buf.get_u8();
25216        __struct.target_component = buf.get_u8();
25217        __struct.req_stream_id = buf.get_u8();
25218        __struct.start_stop = buf.get_u8();
25219        Ok(__struct)
25220    }
25221    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25222        let mut __tmp = BytesMut::new(bytes);
25223        #[allow(clippy::absurd_extreme_comparisons)]
25224        #[allow(unused_comparisons)]
25225        if __tmp.remaining() < Self::ENCODED_LEN {
25226            panic!(
25227                "buffer is too small (need {} bytes, but got {})",
25228                Self::ENCODED_LEN,
25229                __tmp.remaining(),
25230            )
25231        }
25232        __tmp.put_u16_le(self.req_message_rate);
25233        __tmp.put_u8(self.target_system);
25234        __tmp.put_u8(self.target_component);
25235        __tmp.put_u8(self.req_stream_id);
25236        __tmp.put_u8(self.start_stop);
25237        if matches!(version, MavlinkVersion::V2) {
25238            let len = __tmp.len();
25239            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25240        } else {
25241            __tmp.len()
25242        }
25243    }
25244}
25245#[doc = "id: 412"]
25246#[doc = "Request one or more events to be (re-)sent. If first_sequence==last_sequence, only a single event is requested. Note that first_sequence can be larger than last_sequence (because the sequence number can wrap). Each sequence will trigger an EVENT or EVENT_ERROR response."]
25247#[derive(Debug, Clone, PartialEq)]
25248#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25249#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25250pub struct REQUEST_EVENT_DATA {
25251    #[doc = "First sequence number of the requested event."]
25252    pub first_sequence: u16,
25253    #[doc = "Last sequence number of the requested event."]
25254    pub last_sequence: u16,
25255    #[doc = "System ID"]
25256    pub target_system: u8,
25257    #[doc = "Component ID"]
25258    pub target_component: u8,
25259}
25260impl REQUEST_EVENT_DATA {
25261    pub const ENCODED_LEN: usize = 6usize;
25262    pub const DEFAULT: Self = Self {
25263        first_sequence: 0_u16,
25264        last_sequence: 0_u16,
25265        target_system: 0_u8,
25266        target_component: 0_u8,
25267    };
25268    #[cfg(feature = "arbitrary")]
25269    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25270        use arbitrary::{Arbitrary, Unstructured};
25271        let mut buf = [0u8; 1024];
25272        rng.fill_bytes(&mut buf);
25273        let mut unstructured = Unstructured::new(&buf);
25274        Self::arbitrary(&mut unstructured).unwrap_or_default()
25275    }
25276}
25277impl Default for REQUEST_EVENT_DATA {
25278    fn default() -> Self {
25279        Self::DEFAULT.clone()
25280    }
25281}
25282impl MessageData for REQUEST_EVENT_DATA {
25283    type Message = MavMessage;
25284    const ID: u32 = 412u32;
25285    const NAME: &'static str = "REQUEST_EVENT";
25286    const EXTRA_CRC: u8 = 33u8;
25287    const ENCODED_LEN: usize = 6usize;
25288    fn deser(
25289        _version: MavlinkVersion,
25290        __input: &[u8],
25291    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25292        let avail_len = __input.len();
25293        let mut payload_buf = [0; Self::ENCODED_LEN];
25294        let mut buf = if avail_len < Self::ENCODED_LEN {
25295            payload_buf[0..avail_len].copy_from_slice(__input);
25296            Bytes::new(&payload_buf)
25297        } else {
25298            Bytes::new(__input)
25299        };
25300        let mut __struct = Self::default();
25301        __struct.first_sequence = buf.get_u16_le();
25302        __struct.last_sequence = buf.get_u16_le();
25303        __struct.target_system = buf.get_u8();
25304        __struct.target_component = buf.get_u8();
25305        Ok(__struct)
25306    }
25307    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25308        let mut __tmp = BytesMut::new(bytes);
25309        #[allow(clippy::absurd_extreme_comparisons)]
25310        #[allow(unused_comparisons)]
25311        if __tmp.remaining() < Self::ENCODED_LEN {
25312            panic!(
25313                "buffer is too small (need {} bytes, but got {})",
25314                Self::ENCODED_LEN,
25315                __tmp.remaining(),
25316            )
25317        }
25318        __tmp.put_u16_le(self.first_sequence);
25319        __tmp.put_u16_le(self.last_sequence);
25320        __tmp.put_u8(self.target_system);
25321        __tmp.put_u8(self.target_component);
25322        if matches!(version, MavlinkVersion::V2) {
25323            let len = __tmp.len();
25324            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25325        } else {
25326            __tmp.len()
25327        }
25328    }
25329}
25330#[doc = "id: 142"]
25331#[doc = "The autopilot is requesting a resource (file, binary, other type of data)."]
25332#[derive(Debug, Clone, PartialEq)]
25333#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25334#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25335pub struct RESOURCE_REQUEST_DATA {
25336    #[doc = "Request ID. This ID should be re-used when sending back URI contents"]
25337    pub request_id: u8,
25338    #[doc = "The type of requested URI. 0 = a file via URL. 1 = a UAVCAN binary"]
25339    pub uri_type: u8,
25340    #[doc = "The requested unique resource identifier (URI). It is not necessarily a straight domain name (depends on the URI type enum)"]
25341    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25342    pub uri: [u8; 120],
25343    #[doc = "The way the autopilot wants to receive the URI. 0 = MAVLink FTP. 1 = binary stream."]
25344    pub transfer_type: u8,
25345    #[doc = "The storage path the autopilot wants the URI to be stored in. Will only be valid if the transfer_type has a storage associated (e.g. MAVLink FTP)."]
25346    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
25347    pub storage: [u8; 120],
25348}
25349impl RESOURCE_REQUEST_DATA {
25350    pub const ENCODED_LEN: usize = 243usize;
25351    pub const DEFAULT: Self = Self {
25352        request_id: 0_u8,
25353        uri_type: 0_u8,
25354        uri: [0_u8; 120usize],
25355        transfer_type: 0_u8,
25356        storage: [0_u8; 120usize],
25357    };
25358    #[cfg(feature = "arbitrary")]
25359    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25360        use arbitrary::{Arbitrary, Unstructured};
25361        let mut buf = [0u8; 1024];
25362        rng.fill_bytes(&mut buf);
25363        let mut unstructured = Unstructured::new(&buf);
25364        Self::arbitrary(&mut unstructured).unwrap_or_default()
25365    }
25366}
25367impl Default for RESOURCE_REQUEST_DATA {
25368    fn default() -> Self {
25369        Self::DEFAULT.clone()
25370    }
25371}
25372impl MessageData for RESOURCE_REQUEST_DATA {
25373    type Message = MavMessage;
25374    const ID: u32 = 142u32;
25375    const NAME: &'static str = "RESOURCE_REQUEST";
25376    const EXTRA_CRC: u8 = 72u8;
25377    const ENCODED_LEN: usize = 243usize;
25378    fn deser(
25379        _version: MavlinkVersion,
25380        __input: &[u8],
25381    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25382        let avail_len = __input.len();
25383        let mut payload_buf = [0; Self::ENCODED_LEN];
25384        let mut buf = if avail_len < Self::ENCODED_LEN {
25385            payload_buf[0..avail_len].copy_from_slice(__input);
25386            Bytes::new(&payload_buf)
25387        } else {
25388            Bytes::new(__input)
25389        };
25390        let mut __struct = Self::default();
25391        __struct.request_id = buf.get_u8();
25392        __struct.uri_type = buf.get_u8();
25393        for v in &mut __struct.uri {
25394            let val = buf.get_u8();
25395            *v = val;
25396        }
25397        __struct.transfer_type = buf.get_u8();
25398        for v in &mut __struct.storage {
25399            let val = buf.get_u8();
25400            *v = val;
25401        }
25402        Ok(__struct)
25403    }
25404    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25405        let mut __tmp = BytesMut::new(bytes);
25406        #[allow(clippy::absurd_extreme_comparisons)]
25407        #[allow(unused_comparisons)]
25408        if __tmp.remaining() < Self::ENCODED_LEN {
25409            panic!(
25410                "buffer is too small (need {} bytes, but got {})",
25411                Self::ENCODED_LEN,
25412                __tmp.remaining(),
25413            )
25414        }
25415        __tmp.put_u8(self.request_id);
25416        __tmp.put_u8(self.uri_type);
25417        for val in &self.uri {
25418            __tmp.put_u8(*val);
25419        }
25420        __tmp.put_u8(self.transfer_type);
25421        for val in &self.storage {
25422            __tmp.put_u8(*val);
25423        }
25424        if matches!(version, MavlinkVersion::V2) {
25425            let len = __tmp.len();
25426            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25427        } else {
25428            __tmp.len()
25429        }
25430    }
25431}
25432#[doc = "id: 413"]
25433#[doc = "Response to a REQUEST_EVENT in case of an error (e.g. the event is not available anymore)."]
25434#[derive(Debug, Clone, PartialEq)]
25435#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25436#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25437pub struct RESPONSE_EVENT_ERROR_DATA {
25438    #[doc = "Sequence number."]
25439    pub sequence: u16,
25440    #[doc = "Oldest Sequence number that is still available after the sequence set in REQUEST_EVENT."]
25441    pub sequence_oldest_available: u16,
25442    #[doc = "System ID"]
25443    pub target_system: u8,
25444    #[doc = "Component ID"]
25445    pub target_component: u8,
25446    #[doc = "Error reason."]
25447    pub reason: MavEventErrorReason,
25448}
25449impl RESPONSE_EVENT_ERROR_DATA {
25450    pub const ENCODED_LEN: usize = 7usize;
25451    pub const DEFAULT: Self = Self {
25452        sequence: 0_u16,
25453        sequence_oldest_available: 0_u16,
25454        target_system: 0_u8,
25455        target_component: 0_u8,
25456        reason: MavEventErrorReason::DEFAULT,
25457    };
25458    #[cfg(feature = "arbitrary")]
25459    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25460        use arbitrary::{Arbitrary, Unstructured};
25461        let mut buf = [0u8; 1024];
25462        rng.fill_bytes(&mut buf);
25463        let mut unstructured = Unstructured::new(&buf);
25464        Self::arbitrary(&mut unstructured).unwrap_or_default()
25465    }
25466}
25467impl Default for RESPONSE_EVENT_ERROR_DATA {
25468    fn default() -> Self {
25469        Self::DEFAULT.clone()
25470    }
25471}
25472impl MessageData for RESPONSE_EVENT_ERROR_DATA {
25473    type Message = MavMessage;
25474    const ID: u32 = 413u32;
25475    const NAME: &'static str = "RESPONSE_EVENT_ERROR";
25476    const EXTRA_CRC: u8 = 77u8;
25477    const ENCODED_LEN: usize = 7usize;
25478    fn deser(
25479        _version: MavlinkVersion,
25480        __input: &[u8],
25481    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25482        let avail_len = __input.len();
25483        let mut payload_buf = [0; Self::ENCODED_LEN];
25484        let mut buf = if avail_len < Self::ENCODED_LEN {
25485            payload_buf[0..avail_len].copy_from_slice(__input);
25486            Bytes::new(&payload_buf)
25487        } else {
25488            Bytes::new(__input)
25489        };
25490        let mut __struct = Self::default();
25491        __struct.sequence = buf.get_u16_le();
25492        __struct.sequence_oldest_available = buf.get_u16_le();
25493        __struct.target_system = buf.get_u8();
25494        __struct.target_component = buf.get_u8();
25495        let tmp = buf.get_u8();
25496        __struct.reason =
25497            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25498                enum_type: "MavEventErrorReason",
25499                value: tmp as u32,
25500            })?;
25501        Ok(__struct)
25502    }
25503    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25504        let mut __tmp = BytesMut::new(bytes);
25505        #[allow(clippy::absurd_extreme_comparisons)]
25506        #[allow(unused_comparisons)]
25507        if __tmp.remaining() < Self::ENCODED_LEN {
25508            panic!(
25509                "buffer is too small (need {} bytes, but got {})",
25510                Self::ENCODED_LEN,
25511                __tmp.remaining(),
25512            )
25513        }
25514        __tmp.put_u16_le(self.sequence);
25515        __tmp.put_u16_le(self.sequence_oldest_available);
25516        __tmp.put_u8(self.target_system);
25517        __tmp.put_u8(self.target_component);
25518        __tmp.put_u8(self.reason as u8);
25519        if matches!(version, MavlinkVersion::V2) {
25520            let len = __tmp.len();
25521            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25522        } else {
25523            __tmp.len()
25524        }
25525    }
25526}
25527#[doc = "id: 55"]
25528#[doc = "Read out the safety zone the MAV currently assumes."]
25529#[derive(Debug, Clone, PartialEq)]
25530#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25531#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25532pub struct SAFETY_ALLOWED_AREA_DATA {
25533    #[doc = "x position 1 / Latitude 1"]
25534    pub p1x: f32,
25535    #[doc = "y position 1 / Longitude 1"]
25536    pub p1y: f32,
25537    #[doc = "z position 1 / Altitude 1"]
25538    pub p1z: f32,
25539    #[doc = "x position 2 / Latitude 2"]
25540    pub p2x: f32,
25541    #[doc = "y position 2 / Longitude 2"]
25542    pub p2y: f32,
25543    #[doc = "z position 2 / Altitude 2"]
25544    pub p2z: f32,
25545    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25546    pub frame: MavFrame,
25547}
25548impl SAFETY_ALLOWED_AREA_DATA {
25549    pub const ENCODED_LEN: usize = 25usize;
25550    pub const DEFAULT: Self = Self {
25551        p1x: 0.0_f32,
25552        p1y: 0.0_f32,
25553        p1z: 0.0_f32,
25554        p2x: 0.0_f32,
25555        p2y: 0.0_f32,
25556        p2z: 0.0_f32,
25557        frame: MavFrame::DEFAULT,
25558    };
25559    #[cfg(feature = "arbitrary")]
25560    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25561        use arbitrary::{Arbitrary, Unstructured};
25562        let mut buf = [0u8; 1024];
25563        rng.fill_bytes(&mut buf);
25564        let mut unstructured = Unstructured::new(&buf);
25565        Self::arbitrary(&mut unstructured).unwrap_or_default()
25566    }
25567}
25568impl Default for SAFETY_ALLOWED_AREA_DATA {
25569    fn default() -> Self {
25570        Self::DEFAULT.clone()
25571    }
25572}
25573impl MessageData for SAFETY_ALLOWED_AREA_DATA {
25574    type Message = MavMessage;
25575    const ID: u32 = 55u32;
25576    const NAME: &'static str = "SAFETY_ALLOWED_AREA";
25577    const EXTRA_CRC: u8 = 3u8;
25578    const ENCODED_LEN: usize = 25usize;
25579    fn deser(
25580        _version: MavlinkVersion,
25581        __input: &[u8],
25582    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25583        let avail_len = __input.len();
25584        let mut payload_buf = [0; Self::ENCODED_LEN];
25585        let mut buf = if avail_len < Self::ENCODED_LEN {
25586            payload_buf[0..avail_len].copy_from_slice(__input);
25587            Bytes::new(&payload_buf)
25588        } else {
25589            Bytes::new(__input)
25590        };
25591        let mut __struct = Self::default();
25592        __struct.p1x = buf.get_f32_le();
25593        __struct.p1y = buf.get_f32_le();
25594        __struct.p1z = buf.get_f32_le();
25595        __struct.p2x = buf.get_f32_le();
25596        __struct.p2y = buf.get_f32_le();
25597        __struct.p2z = buf.get_f32_le();
25598        let tmp = buf.get_u8();
25599        __struct.frame =
25600            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25601                enum_type: "MavFrame",
25602                value: tmp as u32,
25603            })?;
25604        Ok(__struct)
25605    }
25606    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25607        let mut __tmp = BytesMut::new(bytes);
25608        #[allow(clippy::absurd_extreme_comparisons)]
25609        #[allow(unused_comparisons)]
25610        if __tmp.remaining() < Self::ENCODED_LEN {
25611            panic!(
25612                "buffer is too small (need {} bytes, but got {})",
25613                Self::ENCODED_LEN,
25614                __tmp.remaining(),
25615            )
25616        }
25617        __tmp.put_f32_le(self.p1x);
25618        __tmp.put_f32_le(self.p1y);
25619        __tmp.put_f32_le(self.p1z);
25620        __tmp.put_f32_le(self.p2x);
25621        __tmp.put_f32_le(self.p2y);
25622        __tmp.put_f32_le(self.p2z);
25623        __tmp.put_u8(self.frame as u8);
25624        if matches!(version, MavlinkVersion::V2) {
25625            let len = __tmp.len();
25626            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25627        } else {
25628            __tmp.len()
25629        }
25630    }
25631}
25632#[doc = "id: 54"]
25633#[doc = "Set a safety zone (volume), which is defined by two corners of a cube. This message can be used to tell the MAV which setpoints/waypoints to accept and which to reject. Safety areas are often enforced by national or competition regulations."]
25634#[derive(Debug, Clone, PartialEq)]
25635#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25636#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25637pub struct SAFETY_SET_ALLOWED_AREA_DATA {
25638    #[doc = "x position 1 / Latitude 1"]
25639    pub p1x: f32,
25640    #[doc = "y position 1 / Longitude 1"]
25641    pub p1y: f32,
25642    #[doc = "z position 1 / Altitude 1"]
25643    pub p1z: f32,
25644    #[doc = "x position 2 / Latitude 2"]
25645    pub p2x: f32,
25646    #[doc = "y position 2 / Longitude 2"]
25647    pub p2y: f32,
25648    #[doc = "z position 2 / Altitude 2"]
25649    pub p2z: f32,
25650    #[doc = "System ID"]
25651    pub target_system: u8,
25652    #[doc = "Component ID"]
25653    pub target_component: u8,
25654    #[doc = "Coordinate frame. Can be either global, GPS, right-handed with Z axis up or local, right handed, Z axis down."]
25655    pub frame: MavFrame,
25656}
25657impl SAFETY_SET_ALLOWED_AREA_DATA {
25658    pub const ENCODED_LEN: usize = 27usize;
25659    pub const DEFAULT: Self = Self {
25660        p1x: 0.0_f32,
25661        p1y: 0.0_f32,
25662        p1z: 0.0_f32,
25663        p2x: 0.0_f32,
25664        p2y: 0.0_f32,
25665        p2z: 0.0_f32,
25666        target_system: 0_u8,
25667        target_component: 0_u8,
25668        frame: MavFrame::DEFAULT,
25669    };
25670    #[cfg(feature = "arbitrary")]
25671    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25672        use arbitrary::{Arbitrary, Unstructured};
25673        let mut buf = [0u8; 1024];
25674        rng.fill_bytes(&mut buf);
25675        let mut unstructured = Unstructured::new(&buf);
25676        Self::arbitrary(&mut unstructured).unwrap_or_default()
25677    }
25678}
25679impl Default for SAFETY_SET_ALLOWED_AREA_DATA {
25680    fn default() -> Self {
25681        Self::DEFAULT.clone()
25682    }
25683}
25684impl MessageData for SAFETY_SET_ALLOWED_AREA_DATA {
25685    type Message = MavMessage;
25686    const ID: u32 = 54u32;
25687    const NAME: &'static str = "SAFETY_SET_ALLOWED_AREA";
25688    const EXTRA_CRC: u8 = 15u8;
25689    const ENCODED_LEN: usize = 27usize;
25690    fn deser(
25691        _version: MavlinkVersion,
25692        __input: &[u8],
25693    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25694        let avail_len = __input.len();
25695        let mut payload_buf = [0; Self::ENCODED_LEN];
25696        let mut buf = if avail_len < Self::ENCODED_LEN {
25697            payload_buf[0..avail_len].copy_from_slice(__input);
25698            Bytes::new(&payload_buf)
25699        } else {
25700            Bytes::new(__input)
25701        };
25702        let mut __struct = Self::default();
25703        __struct.p1x = buf.get_f32_le();
25704        __struct.p1y = buf.get_f32_le();
25705        __struct.p1z = buf.get_f32_le();
25706        __struct.p2x = buf.get_f32_le();
25707        __struct.p2y = buf.get_f32_le();
25708        __struct.p2z = buf.get_f32_le();
25709        __struct.target_system = buf.get_u8();
25710        __struct.target_component = buf.get_u8();
25711        let tmp = buf.get_u8();
25712        __struct.frame =
25713            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
25714                enum_type: "MavFrame",
25715                value: tmp as u32,
25716            })?;
25717        Ok(__struct)
25718    }
25719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25720        let mut __tmp = BytesMut::new(bytes);
25721        #[allow(clippy::absurd_extreme_comparisons)]
25722        #[allow(unused_comparisons)]
25723        if __tmp.remaining() < Self::ENCODED_LEN {
25724            panic!(
25725                "buffer is too small (need {} bytes, but got {})",
25726                Self::ENCODED_LEN,
25727                __tmp.remaining(),
25728            )
25729        }
25730        __tmp.put_f32_le(self.p1x);
25731        __tmp.put_f32_le(self.p1y);
25732        __tmp.put_f32_le(self.p1z);
25733        __tmp.put_f32_le(self.p2x);
25734        __tmp.put_f32_le(self.p2y);
25735        __tmp.put_f32_le(self.p2z);
25736        __tmp.put_u8(self.target_system);
25737        __tmp.put_u8(self.target_component);
25738        __tmp.put_u8(self.frame as u8);
25739        if matches!(version, MavlinkVersion::V2) {
25740            let len = __tmp.len();
25741            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25742        } else {
25743            __tmp.len()
25744        }
25745    }
25746}
25747#[doc = "id: 26"]
25748#[doc = "The RAW IMU readings for the usual 9DOF sensor setup. This message should contain the scaled values to the described units."]
25749#[derive(Debug, Clone, PartialEq)]
25750#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25751#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25752pub struct SCALED_IMU_DATA {
25753    #[doc = "Timestamp (time since system boot)."]
25754    pub time_boot_ms: u32,
25755    #[doc = "X acceleration"]
25756    pub xacc: i16,
25757    #[doc = "Y acceleration"]
25758    pub yacc: i16,
25759    #[doc = "Z acceleration"]
25760    pub zacc: i16,
25761    #[doc = "Angular speed around X axis"]
25762    pub xgyro: i16,
25763    #[doc = "Angular speed around Y axis"]
25764    pub ygyro: i16,
25765    #[doc = "Angular speed around Z axis"]
25766    pub zgyro: i16,
25767    #[doc = "X Magnetic field"]
25768    pub xmag: i16,
25769    #[doc = "Y Magnetic field"]
25770    pub ymag: i16,
25771    #[doc = "Z Magnetic field"]
25772    pub zmag: i16,
25773    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25774    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25775    pub temperature: i16,
25776}
25777impl SCALED_IMU_DATA {
25778    pub const ENCODED_LEN: usize = 24usize;
25779    pub const DEFAULT: Self = Self {
25780        time_boot_ms: 0_u32,
25781        xacc: 0_i16,
25782        yacc: 0_i16,
25783        zacc: 0_i16,
25784        xgyro: 0_i16,
25785        ygyro: 0_i16,
25786        zgyro: 0_i16,
25787        xmag: 0_i16,
25788        ymag: 0_i16,
25789        zmag: 0_i16,
25790        temperature: 0_i16,
25791    };
25792    #[cfg(feature = "arbitrary")]
25793    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25794        use arbitrary::{Arbitrary, Unstructured};
25795        let mut buf = [0u8; 1024];
25796        rng.fill_bytes(&mut buf);
25797        let mut unstructured = Unstructured::new(&buf);
25798        Self::arbitrary(&mut unstructured).unwrap_or_default()
25799    }
25800}
25801impl Default for SCALED_IMU_DATA {
25802    fn default() -> Self {
25803        Self::DEFAULT.clone()
25804    }
25805}
25806impl MessageData for SCALED_IMU_DATA {
25807    type Message = MavMessage;
25808    const ID: u32 = 26u32;
25809    const NAME: &'static str = "SCALED_IMU";
25810    const EXTRA_CRC: u8 = 170u8;
25811    const ENCODED_LEN: usize = 24usize;
25812    fn deser(
25813        _version: MavlinkVersion,
25814        __input: &[u8],
25815    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25816        let avail_len = __input.len();
25817        let mut payload_buf = [0; Self::ENCODED_LEN];
25818        let mut buf = if avail_len < Self::ENCODED_LEN {
25819            payload_buf[0..avail_len].copy_from_slice(__input);
25820            Bytes::new(&payload_buf)
25821        } else {
25822            Bytes::new(__input)
25823        };
25824        let mut __struct = Self::default();
25825        __struct.time_boot_ms = buf.get_u32_le();
25826        __struct.xacc = buf.get_i16_le();
25827        __struct.yacc = buf.get_i16_le();
25828        __struct.zacc = buf.get_i16_le();
25829        __struct.xgyro = buf.get_i16_le();
25830        __struct.ygyro = buf.get_i16_le();
25831        __struct.zgyro = buf.get_i16_le();
25832        __struct.xmag = buf.get_i16_le();
25833        __struct.ymag = buf.get_i16_le();
25834        __struct.zmag = buf.get_i16_le();
25835        __struct.temperature = buf.get_i16_le();
25836        Ok(__struct)
25837    }
25838    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25839        let mut __tmp = BytesMut::new(bytes);
25840        #[allow(clippy::absurd_extreme_comparisons)]
25841        #[allow(unused_comparisons)]
25842        if __tmp.remaining() < Self::ENCODED_LEN {
25843            panic!(
25844                "buffer is too small (need {} bytes, but got {})",
25845                Self::ENCODED_LEN,
25846                __tmp.remaining(),
25847            )
25848        }
25849        __tmp.put_u32_le(self.time_boot_ms);
25850        __tmp.put_i16_le(self.xacc);
25851        __tmp.put_i16_le(self.yacc);
25852        __tmp.put_i16_le(self.zacc);
25853        __tmp.put_i16_le(self.xgyro);
25854        __tmp.put_i16_le(self.ygyro);
25855        __tmp.put_i16_le(self.zgyro);
25856        __tmp.put_i16_le(self.xmag);
25857        __tmp.put_i16_le(self.ymag);
25858        __tmp.put_i16_le(self.zmag);
25859        __tmp.put_i16_le(self.temperature);
25860        if matches!(version, MavlinkVersion::V2) {
25861            let len = __tmp.len();
25862            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25863        } else {
25864            __tmp.len()
25865        }
25866    }
25867}
25868#[doc = "id: 116"]
25869#[doc = "The RAW IMU readings for secondary 9DOF sensor setup. This message should contain the scaled values to the described units."]
25870#[derive(Debug, Clone, PartialEq)]
25871#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25872#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25873pub struct SCALED_IMU2_DATA {
25874    #[doc = "Timestamp (time since system boot)."]
25875    pub time_boot_ms: u32,
25876    #[doc = "X acceleration"]
25877    pub xacc: i16,
25878    #[doc = "Y acceleration"]
25879    pub yacc: i16,
25880    #[doc = "Z acceleration"]
25881    pub zacc: i16,
25882    #[doc = "Angular speed around X axis"]
25883    pub xgyro: i16,
25884    #[doc = "Angular speed around Y axis"]
25885    pub ygyro: i16,
25886    #[doc = "Angular speed around Z axis"]
25887    pub zgyro: i16,
25888    #[doc = "X Magnetic field"]
25889    pub xmag: i16,
25890    #[doc = "Y Magnetic field"]
25891    pub ymag: i16,
25892    #[doc = "Z Magnetic field"]
25893    pub zmag: i16,
25894    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
25895    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
25896    pub temperature: i16,
25897}
25898impl SCALED_IMU2_DATA {
25899    pub const ENCODED_LEN: usize = 24usize;
25900    pub const DEFAULT: Self = Self {
25901        time_boot_ms: 0_u32,
25902        xacc: 0_i16,
25903        yacc: 0_i16,
25904        zacc: 0_i16,
25905        xgyro: 0_i16,
25906        ygyro: 0_i16,
25907        zgyro: 0_i16,
25908        xmag: 0_i16,
25909        ymag: 0_i16,
25910        zmag: 0_i16,
25911        temperature: 0_i16,
25912    };
25913    #[cfg(feature = "arbitrary")]
25914    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
25915        use arbitrary::{Arbitrary, Unstructured};
25916        let mut buf = [0u8; 1024];
25917        rng.fill_bytes(&mut buf);
25918        let mut unstructured = Unstructured::new(&buf);
25919        Self::arbitrary(&mut unstructured).unwrap_or_default()
25920    }
25921}
25922impl Default for SCALED_IMU2_DATA {
25923    fn default() -> Self {
25924        Self::DEFAULT.clone()
25925    }
25926}
25927impl MessageData for SCALED_IMU2_DATA {
25928    type Message = MavMessage;
25929    const ID: u32 = 116u32;
25930    const NAME: &'static str = "SCALED_IMU2";
25931    const EXTRA_CRC: u8 = 76u8;
25932    const ENCODED_LEN: usize = 24usize;
25933    fn deser(
25934        _version: MavlinkVersion,
25935        __input: &[u8],
25936    ) -> Result<Self, ::mavlink_core::error::ParserError> {
25937        let avail_len = __input.len();
25938        let mut payload_buf = [0; Self::ENCODED_LEN];
25939        let mut buf = if avail_len < Self::ENCODED_LEN {
25940            payload_buf[0..avail_len].copy_from_slice(__input);
25941            Bytes::new(&payload_buf)
25942        } else {
25943            Bytes::new(__input)
25944        };
25945        let mut __struct = Self::default();
25946        __struct.time_boot_ms = buf.get_u32_le();
25947        __struct.xacc = buf.get_i16_le();
25948        __struct.yacc = buf.get_i16_le();
25949        __struct.zacc = buf.get_i16_le();
25950        __struct.xgyro = buf.get_i16_le();
25951        __struct.ygyro = buf.get_i16_le();
25952        __struct.zgyro = buf.get_i16_le();
25953        __struct.xmag = buf.get_i16_le();
25954        __struct.ymag = buf.get_i16_le();
25955        __struct.zmag = buf.get_i16_le();
25956        __struct.temperature = buf.get_i16_le();
25957        Ok(__struct)
25958    }
25959    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
25960        let mut __tmp = BytesMut::new(bytes);
25961        #[allow(clippy::absurd_extreme_comparisons)]
25962        #[allow(unused_comparisons)]
25963        if __tmp.remaining() < Self::ENCODED_LEN {
25964            panic!(
25965                "buffer is too small (need {} bytes, but got {})",
25966                Self::ENCODED_LEN,
25967                __tmp.remaining(),
25968            )
25969        }
25970        __tmp.put_u32_le(self.time_boot_ms);
25971        __tmp.put_i16_le(self.xacc);
25972        __tmp.put_i16_le(self.yacc);
25973        __tmp.put_i16_le(self.zacc);
25974        __tmp.put_i16_le(self.xgyro);
25975        __tmp.put_i16_le(self.ygyro);
25976        __tmp.put_i16_le(self.zgyro);
25977        __tmp.put_i16_le(self.xmag);
25978        __tmp.put_i16_le(self.ymag);
25979        __tmp.put_i16_le(self.zmag);
25980        __tmp.put_i16_le(self.temperature);
25981        if matches!(version, MavlinkVersion::V2) {
25982            let len = __tmp.len();
25983            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
25984        } else {
25985            __tmp.len()
25986        }
25987    }
25988}
25989#[doc = "id: 129"]
25990#[doc = "The RAW IMU readings for 3rd 9DOF sensor setup. This message should contain the scaled values to the described units."]
25991#[derive(Debug, Clone, PartialEq)]
25992#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
25993#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
25994pub struct SCALED_IMU3_DATA {
25995    #[doc = "Timestamp (time since system boot)."]
25996    pub time_boot_ms: u32,
25997    #[doc = "X acceleration"]
25998    pub xacc: i16,
25999    #[doc = "Y acceleration"]
26000    pub yacc: i16,
26001    #[doc = "Z acceleration"]
26002    pub zacc: i16,
26003    #[doc = "Angular speed around X axis"]
26004    pub xgyro: i16,
26005    #[doc = "Angular speed around Y axis"]
26006    pub ygyro: i16,
26007    #[doc = "Angular speed around Z axis"]
26008    pub zgyro: i16,
26009    #[doc = "X Magnetic field"]
26010    pub xmag: i16,
26011    #[doc = "Y Magnetic field"]
26012    pub ymag: i16,
26013    #[doc = "Z Magnetic field"]
26014    pub zmag: i16,
26015    #[doc = "Temperature, 0: IMU does not provide temperature values. If the IMU is at 0C it must send 1 (0.01C)."]
26016    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26017    pub temperature: i16,
26018}
26019impl SCALED_IMU3_DATA {
26020    pub const ENCODED_LEN: usize = 24usize;
26021    pub const DEFAULT: Self = Self {
26022        time_boot_ms: 0_u32,
26023        xacc: 0_i16,
26024        yacc: 0_i16,
26025        zacc: 0_i16,
26026        xgyro: 0_i16,
26027        ygyro: 0_i16,
26028        zgyro: 0_i16,
26029        xmag: 0_i16,
26030        ymag: 0_i16,
26031        zmag: 0_i16,
26032        temperature: 0_i16,
26033    };
26034    #[cfg(feature = "arbitrary")]
26035    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26036        use arbitrary::{Arbitrary, Unstructured};
26037        let mut buf = [0u8; 1024];
26038        rng.fill_bytes(&mut buf);
26039        let mut unstructured = Unstructured::new(&buf);
26040        Self::arbitrary(&mut unstructured).unwrap_or_default()
26041    }
26042}
26043impl Default for SCALED_IMU3_DATA {
26044    fn default() -> Self {
26045        Self::DEFAULT.clone()
26046    }
26047}
26048impl MessageData for SCALED_IMU3_DATA {
26049    type Message = MavMessage;
26050    const ID: u32 = 129u32;
26051    const NAME: &'static str = "SCALED_IMU3";
26052    const EXTRA_CRC: u8 = 46u8;
26053    const ENCODED_LEN: usize = 24usize;
26054    fn deser(
26055        _version: MavlinkVersion,
26056        __input: &[u8],
26057    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26058        let avail_len = __input.len();
26059        let mut payload_buf = [0; Self::ENCODED_LEN];
26060        let mut buf = if avail_len < Self::ENCODED_LEN {
26061            payload_buf[0..avail_len].copy_from_slice(__input);
26062            Bytes::new(&payload_buf)
26063        } else {
26064            Bytes::new(__input)
26065        };
26066        let mut __struct = Self::default();
26067        __struct.time_boot_ms = buf.get_u32_le();
26068        __struct.xacc = buf.get_i16_le();
26069        __struct.yacc = buf.get_i16_le();
26070        __struct.zacc = buf.get_i16_le();
26071        __struct.xgyro = buf.get_i16_le();
26072        __struct.ygyro = buf.get_i16_le();
26073        __struct.zgyro = buf.get_i16_le();
26074        __struct.xmag = buf.get_i16_le();
26075        __struct.ymag = buf.get_i16_le();
26076        __struct.zmag = buf.get_i16_le();
26077        __struct.temperature = buf.get_i16_le();
26078        Ok(__struct)
26079    }
26080    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26081        let mut __tmp = BytesMut::new(bytes);
26082        #[allow(clippy::absurd_extreme_comparisons)]
26083        #[allow(unused_comparisons)]
26084        if __tmp.remaining() < Self::ENCODED_LEN {
26085            panic!(
26086                "buffer is too small (need {} bytes, but got {})",
26087                Self::ENCODED_LEN,
26088                __tmp.remaining(),
26089            )
26090        }
26091        __tmp.put_u32_le(self.time_boot_ms);
26092        __tmp.put_i16_le(self.xacc);
26093        __tmp.put_i16_le(self.yacc);
26094        __tmp.put_i16_le(self.zacc);
26095        __tmp.put_i16_le(self.xgyro);
26096        __tmp.put_i16_le(self.ygyro);
26097        __tmp.put_i16_le(self.zgyro);
26098        __tmp.put_i16_le(self.xmag);
26099        __tmp.put_i16_le(self.ymag);
26100        __tmp.put_i16_le(self.zmag);
26101        __tmp.put_i16_le(self.temperature);
26102        if matches!(version, MavlinkVersion::V2) {
26103            let len = __tmp.len();
26104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26105        } else {
26106            __tmp.len()
26107        }
26108    }
26109}
26110#[doc = "id: 29"]
26111#[doc = "The pressure readings for the typical setup of one absolute and differential pressure sensor. The units are as specified in each field."]
26112#[derive(Debug, Clone, PartialEq)]
26113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26115pub struct SCALED_PRESSURE_DATA {
26116    #[doc = "Timestamp (time since system boot)."]
26117    pub time_boot_ms: u32,
26118    #[doc = "Absolute pressure"]
26119    pub press_abs: f32,
26120    #[doc = "Differential pressure 1"]
26121    pub press_diff: f32,
26122    #[doc = "Absolute pressure temperature"]
26123    pub temperature: i16,
26124    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26125    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26126    pub temperature_press_diff: i16,
26127}
26128impl SCALED_PRESSURE_DATA {
26129    pub const ENCODED_LEN: usize = 16usize;
26130    pub const DEFAULT: Self = Self {
26131        time_boot_ms: 0_u32,
26132        press_abs: 0.0_f32,
26133        press_diff: 0.0_f32,
26134        temperature: 0_i16,
26135        temperature_press_diff: 0_i16,
26136    };
26137    #[cfg(feature = "arbitrary")]
26138    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26139        use arbitrary::{Arbitrary, Unstructured};
26140        let mut buf = [0u8; 1024];
26141        rng.fill_bytes(&mut buf);
26142        let mut unstructured = Unstructured::new(&buf);
26143        Self::arbitrary(&mut unstructured).unwrap_or_default()
26144    }
26145}
26146impl Default for SCALED_PRESSURE_DATA {
26147    fn default() -> Self {
26148        Self::DEFAULT.clone()
26149    }
26150}
26151impl MessageData for SCALED_PRESSURE_DATA {
26152    type Message = MavMessage;
26153    const ID: u32 = 29u32;
26154    const NAME: &'static str = "SCALED_PRESSURE";
26155    const EXTRA_CRC: u8 = 115u8;
26156    const ENCODED_LEN: usize = 16usize;
26157    fn deser(
26158        _version: MavlinkVersion,
26159        __input: &[u8],
26160    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26161        let avail_len = __input.len();
26162        let mut payload_buf = [0; Self::ENCODED_LEN];
26163        let mut buf = if avail_len < Self::ENCODED_LEN {
26164            payload_buf[0..avail_len].copy_from_slice(__input);
26165            Bytes::new(&payload_buf)
26166        } else {
26167            Bytes::new(__input)
26168        };
26169        let mut __struct = Self::default();
26170        __struct.time_boot_ms = buf.get_u32_le();
26171        __struct.press_abs = buf.get_f32_le();
26172        __struct.press_diff = buf.get_f32_le();
26173        __struct.temperature = buf.get_i16_le();
26174        __struct.temperature_press_diff = buf.get_i16_le();
26175        Ok(__struct)
26176    }
26177    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26178        let mut __tmp = BytesMut::new(bytes);
26179        #[allow(clippy::absurd_extreme_comparisons)]
26180        #[allow(unused_comparisons)]
26181        if __tmp.remaining() < Self::ENCODED_LEN {
26182            panic!(
26183                "buffer is too small (need {} bytes, but got {})",
26184                Self::ENCODED_LEN,
26185                __tmp.remaining(),
26186            )
26187        }
26188        __tmp.put_u32_le(self.time_boot_ms);
26189        __tmp.put_f32_le(self.press_abs);
26190        __tmp.put_f32_le(self.press_diff);
26191        __tmp.put_i16_le(self.temperature);
26192        __tmp.put_i16_le(self.temperature_press_diff);
26193        if matches!(version, MavlinkVersion::V2) {
26194            let len = __tmp.len();
26195            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26196        } else {
26197            __tmp.len()
26198        }
26199    }
26200}
26201#[doc = "id: 137"]
26202#[doc = "Barometer readings for 2nd barometer."]
26203#[derive(Debug, Clone, PartialEq)]
26204#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26205#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26206pub struct SCALED_PRESSURE2_DATA {
26207    #[doc = "Timestamp (time since system boot)."]
26208    pub time_boot_ms: u32,
26209    #[doc = "Absolute pressure"]
26210    pub press_abs: f32,
26211    #[doc = "Differential pressure"]
26212    pub press_diff: f32,
26213    #[doc = "Absolute pressure temperature"]
26214    pub temperature: i16,
26215    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26216    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26217    pub temperature_press_diff: i16,
26218}
26219impl SCALED_PRESSURE2_DATA {
26220    pub const ENCODED_LEN: usize = 16usize;
26221    pub const DEFAULT: Self = Self {
26222        time_boot_ms: 0_u32,
26223        press_abs: 0.0_f32,
26224        press_diff: 0.0_f32,
26225        temperature: 0_i16,
26226        temperature_press_diff: 0_i16,
26227    };
26228    #[cfg(feature = "arbitrary")]
26229    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26230        use arbitrary::{Arbitrary, Unstructured};
26231        let mut buf = [0u8; 1024];
26232        rng.fill_bytes(&mut buf);
26233        let mut unstructured = Unstructured::new(&buf);
26234        Self::arbitrary(&mut unstructured).unwrap_or_default()
26235    }
26236}
26237impl Default for SCALED_PRESSURE2_DATA {
26238    fn default() -> Self {
26239        Self::DEFAULT.clone()
26240    }
26241}
26242impl MessageData for SCALED_PRESSURE2_DATA {
26243    type Message = MavMessage;
26244    const ID: u32 = 137u32;
26245    const NAME: &'static str = "SCALED_PRESSURE2";
26246    const EXTRA_CRC: u8 = 195u8;
26247    const ENCODED_LEN: usize = 16usize;
26248    fn deser(
26249        _version: MavlinkVersion,
26250        __input: &[u8],
26251    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26252        let avail_len = __input.len();
26253        let mut payload_buf = [0; Self::ENCODED_LEN];
26254        let mut buf = if avail_len < Self::ENCODED_LEN {
26255            payload_buf[0..avail_len].copy_from_slice(__input);
26256            Bytes::new(&payload_buf)
26257        } else {
26258            Bytes::new(__input)
26259        };
26260        let mut __struct = Self::default();
26261        __struct.time_boot_ms = buf.get_u32_le();
26262        __struct.press_abs = buf.get_f32_le();
26263        __struct.press_diff = buf.get_f32_le();
26264        __struct.temperature = buf.get_i16_le();
26265        __struct.temperature_press_diff = buf.get_i16_le();
26266        Ok(__struct)
26267    }
26268    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26269        let mut __tmp = BytesMut::new(bytes);
26270        #[allow(clippy::absurd_extreme_comparisons)]
26271        #[allow(unused_comparisons)]
26272        if __tmp.remaining() < Self::ENCODED_LEN {
26273            panic!(
26274                "buffer is too small (need {} bytes, but got {})",
26275                Self::ENCODED_LEN,
26276                __tmp.remaining(),
26277            )
26278        }
26279        __tmp.put_u32_le(self.time_boot_ms);
26280        __tmp.put_f32_le(self.press_abs);
26281        __tmp.put_f32_le(self.press_diff);
26282        __tmp.put_i16_le(self.temperature);
26283        __tmp.put_i16_le(self.temperature_press_diff);
26284        if matches!(version, MavlinkVersion::V2) {
26285            let len = __tmp.len();
26286            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26287        } else {
26288            __tmp.len()
26289        }
26290    }
26291}
26292#[doc = "id: 143"]
26293#[doc = "Barometer readings for 3rd barometer."]
26294#[derive(Debug, Clone, PartialEq)]
26295#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26296#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26297pub struct SCALED_PRESSURE3_DATA {
26298    #[doc = "Timestamp (time since system boot)."]
26299    pub time_boot_ms: u32,
26300    #[doc = "Absolute pressure"]
26301    pub press_abs: f32,
26302    #[doc = "Differential pressure"]
26303    pub press_diff: f32,
26304    #[doc = "Absolute pressure temperature"]
26305    pub temperature: i16,
26306    #[doc = "Differential pressure temperature (0, if not available). Report values of 0 (or 1) as 1 cdegC."]
26307    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26308    pub temperature_press_diff: i16,
26309}
26310impl SCALED_PRESSURE3_DATA {
26311    pub const ENCODED_LEN: usize = 16usize;
26312    pub const DEFAULT: Self = Self {
26313        time_boot_ms: 0_u32,
26314        press_abs: 0.0_f32,
26315        press_diff: 0.0_f32,
26316        temperature: 0_i16,
26317        temperature_press_diff: 0_i16,
26318    };
26319    #[cfg(feature = "arbitrary")]
26320    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26321        use arbitrary::{Arbitrary, Unstructured};
26322        let mut buf = [0u8; 1024];
26323        rng.fill_bytes(&mut buf);
26324        let mut unstructured = Unstructured::new(&buf);
26325        Self::arbitrary(&mut unstructured).unwrap_or_default()
26326    }
26327}
26328impl Default for SCALED_PRESSURE3_DATA {
26329    fn default() -> Self {
26330        Self::DEFAULT.clone()
26331    }
26332}
26333impl MessageData for SCALED_PRESSURE3_DATA {
26334    type Message = MavMessage;
26335    const ID: u32 = 143u32;
26336    const NAME: &'static str = "SCALED_PRESSURE3";
26337    const EXTRA_CRC: u8 = 131u8;
26338    const ENCODED_LEN: usize = 16usize;
26339    fn deser(
26340        _version: MavlinkVersion,
26341        __input: &[u8],
26342    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26343        let avail_len = __input.len();
26344        let mut payload_buf = [0; Self::ENCODED_LEN];
26345        let mut buf = if avail_len < Self::ENCODED_LEN {
26346            payload_buf[0..avail_len].copy_from_slice(__input);
26347            Bytes::new(&payload_buf)
26348        } else {
26349            Bytes::new(__input)
26350        };
26351        let mut __struct = Self::default();
26352        __struct.time_boot_ms = buf.get_u32_le();
26353        __struct.press_abs = buf.get_f32_le();
26354        __struct.press_diff = buf.get_f32_le();
26355        __struct.temperature = buf.get_i16_le();
26356        __struct.temperature_press_diff = buf.get_i16_le();
26357        Ok(__struct)
26358    }
26359    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26360        let mut __tmp = BytesMut::new(bytes);
26361        #[allow(clippy::absurd_extreme_comparisons)]
26362        #[allow(unused_comparisons)]
26363        if __tmp.remaining() < Self::ENCODED_LEN {
26364            panic!(
26365                "buffer is too small (need {} bytes, but got {})",
26366                Self::ENCODED_LEN,
26367                __tmp.remaining(),
26368            )
26369        }
26370        __tmp.put_u32_le(self.time_boot_ms);
26371        __tmp.put_f32_le(self.press_abs);
26372        __tmp.put_f32_le(self.press_diff);
26373        __tmp.put_i16_le(self.temperature);
26374        __tmp.put_i16_le(self.temperature_press_diff);
26375        if matches!(version, MavlinkVersion::V2) {
26376            let len = __tmp.len();
26377            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26378        } else {
26379            __tmp.len()
26380        }
26381    }
26382}
26383#[doc = "id: 126"]
26384#[doc = "Control a serial port. This can be used for raw access to an onboard serial peripheral such as a GPS or telemetry radio. It is designed to make it possible to update the devices firmware via MAVLink messages or change the devices settings. A message with zero bytes can be used to change just the baudrate."]
26385#[derive(Debug, Clone, PartialEq)]
26386#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26387#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26388pub struct SERIAL_CONTROL_DATA {
26389    #[doc = "Baudrate of transfer. Zero means no change."]
26390    pub baudrate: u32,
26391    #[doc = "Timeout for reply data"]
26392    pub timeout: u16,
26393    #[doc = "Serial control device type."]
26394    pub device: SerialControlDev,
26395    #[doc = "Bitmap of serial control flags."]
26396    pub flags: SerialControlFlag,
26397    #[doc = "how many bytes in this transfer"]
26398    pub count: u8,
26399    #[doc = "serial data"]
26400    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26401    pub data: [u8; 70],
26402    #[doc = "System ID"]
26403    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26404    pub target_system: u8,
26405    #[doc = "Component ID"]
26406    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26407    pub target_component: u8,
26408}
26409impl SERIAL_CONTROL_DATA {
26410    pub const ENCODED_LEN: usize = 81usize;
26411    pub const DEFAULT: Self = Self {
26412        baudrate: 0_u32,
26413        timeout: 0_u16,
26414        device: SerialControlDev::DEFAULT,
26415        flags: SerialControlFlag::DEFAULT,
26416        count: 0_u8,
26417        data: [0_u8; 70usize],
26418        target_system: 0_u8,
26419        target_component: 0_u8,
26420    };
26421    #[cfg(feature = "arbitrary")]
26422    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26423        use arbitrary::{Arbitrary, Unstructured};
26424        let mut buf = [0u8; 1024];
26425        rng.fill_bytes(&mut buf);
26426        let mut unstructured = Unstructured::new(&buf);
26427        Self::arbitrary(&mut unstructured).unwrap_or_default()
26428    }
26429}
26430impl Default for SERIAL_CONTROL_DATA {
26431    fn default() -> Self {
26432        Self::DEFAULT.clone()
26433    }
26434}
26435impl MessageData for SERIAL_CONTROL_DATA {
26436    type Message = MavMessage;
26437    const ID: u32 = 126u32;
26438    const NAME: &'static str = "SERIAL_CONTROL";
26439    const EXTRA_CRC: u8 = 220u8;
26440    const ENCODED_LEN: usize = 81usize;
26441    fn deser(
26442        _version: MavlinkVersion,
26443        __input: &[u8],
26444    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26445        let avail_len = __input.len();
26446        let mut payload_buf = [0; Self::ENCODED_LEN];
26447        let mut buf = if avail_len < Self::ENCODED_LEN {
26448            payload_buf[0..avail_len].copy_from_slice(__input);
26449            Bytes::new(&payload_buf)
26450        } else {
26451            Bytes::new(__input)
26452        };
26453        let mut __struct = Self::default();
26454        __struct.baudrate = buf.get_u32_le();
26455        __struct.timeout = buf.get_u16_le();
26456        let tmp = buf.get_u8();
26457        __struct.device =
26458            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
26459                enum_type: "SerialControlDev",
26460                value: tmp as u32,
26461            })?;
26462        let tmp = buf.get_u8();
26463        __struct.flags = SerialControlFlag::from_bits(tmp & SerialControlFlag::all().bits())
26464            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26465                flag_type: "SerialControlFlag",
26466                value: tmp as u32,
26467            })?;
26468        __struct.count = buf.get_u8();
26469        for v in &mut __struct.data {
26470            let val = buf.get_u8();
26471            *v = val;
26472        }
26473        __struct.target_system = buf.get_u8();
26474        __struct.target_component = buf.get_u8();
26475        Ok(__struct)
26476    }
26477    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26478        let mut __tmp = BytesMut::new(bytes);
26479        #[allow(clippy::absurd_extreme_comparisons)]
26480        #[allow(unused_comparisons)]
26481        if __tmp.remaining() < Self::ENCODED_LEN {
26482            panic!(
26483                "buffer is too small (need {} bytes, but got {})",
26484                Self::ENCODED_LEN,
26485                __tmp.remaining(),
26486            )
26487        }
26488        __tmp.put_u32_le(self.baudrate);
26489        __tmp.put_u16_le(self.timeout);
26490        __tmp.put_u8(self.device as u8);
26491        __tmp.put_u8(self.flags.bits());
26492        __tmp.put_u8(self.count);
26493        for val in &self.data {
26494            __tmp.put_u8(*val);
26495        }
26496        __tmp.put_u8(self.target_system);
26497        __tmp.put_u8(self.target_component);
26498        if matches!(version, MavlinkVersion::V2) {
26499            let len = __tmp.len();
26500            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26501        } else {
26502            __tmp.len()
26503        }
26504    }
26505}
26506#[doc = "id: 36"]
26507#[doc = "Superseded by ACTUATOR_OUTPUT_STATUS. The RAW values of the servo outputs (for RC input from the remote, use the RC_CHANNELS messages). The standard PPM modulation is as follows: 1000 microseconds: 0%, 2000 microseconds: 100%."]
26508#[derive(Debug, Clone, PartialEq)]
26509#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26510#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26511pub struct SERVO_OUTPUT_RAW_DATA {
26512    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26513    pub time_usec: u32,
26514    #[doc = "Servo output 1 value"]
26515    pub servo1_raw: u16,
26516    #[doc = "Servo output 2 value"]
26517    pub servo2_raw: u16,
26518    #[doc = "Servo output 3 value"]
26519    pub servo3_raw: u16,
26520    #[doc = "Servo output 4 value"]
26521    pub servo4_raw: u16,
26522    #[doc = "Servo output 5 value"]
26523    pub servo5_raw: u16,
26524    #[doc = "Servo output 6 value"]
26525    pub servo6_raw: u16,
26526    #[doc = "Servo output 7 value"]
26527    pub servo7_raw: u16,
26528    #[doc = "Servo output 8 value"]
26529    pub servo8_raw: u16,
26530    #[doc = "Servo output port (set of 8 outputs = 1 port). Flight stacks running on Pixhawk should use: 0 = MAIN, 1 = AUX."]
26531    pub port: u8,
26532    #[doc = "Servo output 9 value"]
26533    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26534    pub servo9_raw: u16,
26535    #[doc = "Servo output 10 value"]
26536    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26537    pub servo10_raw: u16,
26538    #[doc = "Servo output 11 value"]
26539    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26540    pub servo11_raw: u16,
26541    #[doc = "Servo output 12 value"]
26542    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26543    pub servo12_raw: u16,
26544    #[doc = "Servo output 13 value"]
26545    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26546    pub servo13_raw: u16,
26547    #[doc = "Servo output 14 value"]
26548    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26549    pub servo14_raw: u16,
26550    #[doc = "Servo output 15 value"]
26551    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26552    pub servo15_raw: u16,
26553    #[doc = "Servo output 16 value"]
26554    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26555    pub servo16_raw: u16,
26556}
26557impl SERVO_OUTPUT_RAW_DATA {
26558    pub const ENCODED_LEN: usize = 37usize;
26559    pub const DEFAULT: Self = Self {
26560        time_usec: 0_u32,
26561        servo1_raw: 0_u16,
26562        servo2_raw: 0_u16,
26563        servo3_raw: 0_u16,
26564        servo4_raw: 0_u16,
26565        servo5_raw: 0_u16,
26566        servo6_raw: 0_u16,
26567        servo7_raw: 0_u16,
26568        servo8_raw: 0_u16,
26569        port: 0_u8,
26570        servo9_raw: 0_u16,
26571        servo10_raw: 0_u16,
26572        servo11_raw: 0_u16,
26573        servo12_raw: 0_u16,
26574        servo13_raw: 0_u16,
26575        servo14_raw: 0_u16,
26576        servo15_raw: 0_u16,
26577        servo16_raw: 0_u16,
26578    };
26579    #[cfg(feature = "arbitrary")]
26580    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26581        use arbitrary::{Arbitrary, Unstructured};
26582        let mut buf = [0u8; 1024];
26583        rng.fill_bytes(&mut buf);
26584        let mut unstructured = Unstructured::new(&buf);
26585        Self::arbitrary(&mut unstructured).unwrap_or_default()
26586    }
26587}
26588impl Default for SERVO_OUTPUT_RAW_DATA {
26589    fn default() -> Self {
26590        Self::DEFAULT.clone()
26591    }
26592}
26593impl MessageData for SERVO_OUTPUT_RAW_DATA {
26594    type Message = MavMessage;
26595    const ID: u32 = 36u32;
26596    const NAME: &'static str = "SERVO_OUTPUT_RAW";
26597    const EXTRA_CRC: u8 = 222u8;
26598    const ENCODED_LEN: usize = 37usize;
26599    fn deser(
26600        _version: MavlinkVersion,
26601        __input: &[u8],
26602    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26603        let avail_len = __input.len();
26604        let mut payload_buf = [0; Self::ENCODED_LEN];
26605        let mut buf = if avail_len < Self::ENCODED_LEN {
26606            payload_buf[0..avail_len].copy_from_slice(__input);
26607            Bytes::new(&payload_buf)
26608        } else {
26609            Bytes::new(__input)
26610        };
26611        let mut __struct = Self::default();
26612        __struct.time_usec = buf.get_u32_le();
26613        __struct.servo1_raw = buf.get_u16_le();
26614        __struct.servo2_raw = buf.get_u16_le();
26615        __struct.servo3_raw = buf.get_u16_le();
26616        __struct.servo4_raw = buf.get_u16_le();
26617        __struct.servo5_raw = buf.get_u16_le();
26618        __struct.servo6_raw = buf.get_u16_le();
26619        __struct.servo7_raw = buf.get_u16_le();
26620        __struct.servo8_raw = buf.get_u16_le();
26621        __struct.port = buf.get_u8();
26622        __struct.servo9_raw = buf.get_u16_le();
26623        __struct.servo10_raw = buf.get_u16_le();
26624        __struct.servo11_raw = buf.get_u16_le();
26625        __struct.servo12_raw = buf.get_u16_le();
26626        __struct.servo13_raw = buf.get_u16_le();
26627        __struct.servo14_raw = buf.get_u16_le();
26628        __struct.servo15_raw = buf.get_u16_le();
26629        __struct.servo16_raw = buf.get_u16_le();
26630        Ok(__struct)
26631    }
26632    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26633        let mut __tmp = BytesMut::new(bytes);
26634        #[allow(clippy::absurd_extreme_comparisons)]
26635        #[allow(unused_comparisons)]
26636        if __tmp.remaining() < Self::ENCODED_LEN {
26637            panic!(
26638                "buffer is too small (need {} bytes, but got {})",
26639                Self::ENCODED_LEN,
26640                __tmp.remaining(),
26641            )
26642        }
26643        __tmp.put_u32_le(self.time_usec);
26644        __tmp.put_u16_le(self.servo1_raw);
26645        __tmp.put_u16_le(self.servo2_raw);
26646        __tmp.put_u16_le(self.servo3_raw);
26647        __tmp.put_u16_le(self.servo4_raw);
26648        __tmp.put_u16_le(self.servo5_raw);
26649        __tmp.put_u16_le(self.servo6_raw);
26650        __tmp.put_u16_le(self.servo7_raw);
26651        __tmp.put_u16_le(self.servo8_raw);
26652        __tmp.put_u8(self.port);
26653        __tmp.put_u16_le(self.servo9_raw);
26654        __tmp.put_u16_le(self.servo10_raw);
26655        __tmp.put_u16_le(self.servo11_raw);
26656        __tmp.put_u16_le(self.servo12_raw);
26657        __tmp.put_u16_le(self.servo13_raw);
26658        __tmp.put_u16_le(self.servo14_raw);
26659        __tmp.put_u16_le(self.servo15_raw);
26660        __tmp.put_u16_le(self.servo16_raw);
26661        if matches!(version, MavlinkVersion::V2) {
26662            let len = __tmp.len();
26663            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26664        } else {
26665            __tmp.len()
26666        }
26667    }
26668}
26669#[doc = "id: 256"]
26670#[doc = "Setup a MAVLink2 signing key. If called with secret_key of all zero and zero initial_timestamp will disable signing."]
26671#[derive(Debug, Clone, PartialEq)]
26672#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26673#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26674pub struct SETUP_SIGNING_DATA {
26675    #[doc = "initial timestamp"]
26676    pub initial_timestamp: u64,
26677    #[doc = "system id of the target"]
26678    pub target_system: u8,
26679    #[doc = "component ID of the target"]
26680    pub target_component: u8,
26681    #[doc = "signing key"]
26682    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26683    pub secret_key: [u8; 32],
26684}
26685impl SETUP_SIGNING_DATA {
26686    pub const ENCODED_LEN: usize = 42usize;
26687    pub const DEFAULT: Self = Self {
26688        initial_timestamp: 0_u64,
26689        target_system: 0_u8,
26690        target_component: 0_u8,
26691        secret_key: [0_u8; 32usize],
26692    };
26693    #[cfg(feature = "arbitrary")]
26694    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26695        use arbitrary::{Arbitrary, Unstructured};
26696        let mut buf = [0u8; 1024];
26697        rng.fill_bytes(&mut buf);
26698        let mut unstructured = Unstructured::new(&buf);
26699        Self::arbitrary(&mut unstructured).unwrap_or_default()
26700    }
26701}
26702impl Default for SETUP_SIGNING_DATA {
26703    fn default() -> Self {
26704        Self::DEFAULT.clone()
26705    }
26706}
26707impl MessageData for SETUP_SIGNING_DATA {
26708    type Message = MavMessage;
26709    const ID: u32 = 256u32;
26710    const NAME: &'static str = "SETUP_SIGNING";
26711    const EXTRA_CRC: u8 = 71u8;
26712    const ENCODED_LEN: usize = 42usize;
26713    fn deser(
26714        _version: MavlinkVersion,
26715        __input: &[u8],
26716    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26717        let avail_len = __input.len();
26718        let mut payload_buf = [0; Self::ENCODED_LEN];
26719        let mut buf = if avail_len < Self::ENCODED_LEN {
26720            payload_buf[0..avail_len].copy_from_slice(__input);
26721            Bytes::new(&payload_buf)
26722        } else {
26723            Bytes::new(__input)
26724        };
26725        let mut __struct = Self::default();
26726        __struct.initial_timestamp = buf.get_u64_le();
26727        __struct.target_system = buf.get_u8();
26728        __struct.target_component = buf.get_u8();
26729        for v in &mut __struct.secret_key {
26730            let val = buf.get_u8();
26731            *v = val;
26732        }
26733        Ok(__struct)
26734    }
26735    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26736        let mut __tmp = BytesMut::new(bytes);
26737        #[allow(clippy::absurd_extreme_comparisons)]
26738        #[allow(unused_comparisons)]
26739        if __tmp.remaining() < Self::ENCODED_LEN {
26740            panic!(
26741                "buffer is too small (need {} bytes, but got {})",
26742                Self::ENCODED_LEN,
26743                __tmp.remaining(),
26744            )
26745        }
26746        __tmp.put_u64_le(self.initial_timestamp);
26747        __tmp.put_u8(self.target_system);
26748        __tmp.put_u8(self.target_component);
26749        for val in &self.secret_key {
26750            __tmp.put_u8(*val);
26751        }
26752        if matches!(version, MavlinkVersion::V2) {
26753            let len = __tmp.len();
26754            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26755        } else {
26756            __tmp.len()
26757        }
26758    }
26759}
26760#[doc = "id: 139"]
26761#[doc = "Set the vehicle attitude and body angular rates."]
26762#[derive(Debug, Clone, PartialEq)]
26763#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26764#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26765pub struct SET_ACTUATOR_CONTROL_TARGET_DATA {
26766    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
26767    pub time_usec: u64,
26768    #[doc = "Actuator controls. Normed to -1..+1 where 0 is neutral position. Throttle for single rotation direction motors is 0..1, negative range for reverse direction. Standard mapping for attitude controls (group 0): (index 0-7): roll, pitch, yaw, throttle, flaps, spoilers, airbrakes, landing gear. Load a pass-through mixer to repurpose them as generic outputs."]
26769    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26770    pub controls: [f32; 8],
26771    #[doc = "Actuator group. The \"_mlx\" indicates this is a multi-instance message and a MAVLink parser should use this field to difference between instances."]
26772    pub group_mlx: u8,
26773    #[doc = "System ID"]
26774    pub target_system: u8,
26775    #[doc = "Component ID"]
26776    pub target_component: u8,
26777}
26778impl SET_ACTUATOR_CONTROL_TARGET_DATA {
26779    pub const ENCODED_LEN: usize = 43usize;
26780    pub const DEFAULT: Self = Self {
26781        time_usec: 0_u64,
26782        controls: [0.0_f32; 8usize],
26783        group_mlx: 0_u8,
26784        target_system: 0_u8,
26785        target_component: 0_u8,
26786    };
26787    #[cfg(feature = "arbitrary")]
26788    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26789        use arbitrary::{Arbitrary, Unstructured};
26790        let mut buf = [0u8; 1024];
26791        rng.fill_bytes(&mut buf);
26792        let mut unstructured = Unstructured::new(&buf);
26793        Self::arbitrary(&mut unstructured).unwrap_or_default()
26794    }
26795}
26796impl Default for SET_ACTUATOR_CONTROL_TARGET_DATA {
26797    fn default() -> Self {
26798        Self::DEFAULT.clone()
26799    }
26800}
26801impl MessageData for SET_ACTUATOR_CONTROL_TARGET_DATA {
26802    type Message = MavMessage;
26803    const ID: u32 = 139u32;
26804    const NAME: &'static str = "SET_ACTUATOR_CONTROL_TARGET";
26805    const EXTRA_CRC: u8 = 168u8;
26806    const ENCODED_LEN: usize = 43usize;
26807    fn deser(
26808        _version: MavlinkVersion,
26809        __input: &[u8],
26810    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26811        let avail_len = __input.len();
26812        let mut payload_buf = [0; Self::ENCODED_LEN];
26813        let mut buf = if avail_len < Self::ENCODED_LEN {
26814            payload_buf[0..avail_len].copy_from_slice(__input);
26815            Bytes::new(&payload_buf)
26816        } else {
26817            Bytes::new(__input)
26818        };
26819        let mut __struct = Self::default();
26820        __struct.time_usec = buf.get_u64_le();
26821        for v in &mut __struct.controls {
26822            let val = buf.get_f32_le();
26823            *v = val;
26824        }
26825        __struct.group_mlx = buf.get_u8();
26826        __struct.target_system = buf.get_u8();
26827        __struct.target_component = buf.get_u8();
26828        Ok(__struct)
26829    }
26830    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26831        let mut __tmp = BytesMut::new(bytes);
26832        #[allow(clippy::absurd_extreme_comparisons)]
26833        #[allow(unused_comparisons)]
26834        if __tmp.remaining() < Self::ENCODED_LEN {
26835            panic!(
26836                "buffer is too small (need {} bytes, but got {})",
26837                Self::ENCODED_LEN,
26838                __tmp.remaining(),
26839            )
26840        }
26841        __tmp.put_u64_le(self.time_usec);
26842        for val in &self.controls {
26843            __tmp.put_f32_le(*val);
26844        }
26845        __tmp.put_u8(self.group_mlx);
26846        __tmp.put_u8(self.target_system);
26847        __tmp.put_u8(self.target_component);
26848        if matches!(version, MavlinkVersion::V2) {
26849            let len = __tmp.len();
26850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26851        } else {
26852            __tmp.len()
26853        }
26854    }
26855}
26856#[doc = "id: 82"]
26857#[doc = "Sets a desired vehicle attitude. Used by an external controller to command the vehicle (manual controller or other system)."]
26858#[derive(Debug, Clone, PartialEq)]
26859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26861pub struct SET_ATTITUDE_TARGET_DATA {
26862    #[doc = "Timestamp (time since system boot)."]
26863    pub time_boot_ms: u32,
26864    #[doc = "Attitude quaternion (w, x, y, z order, zero-rotation is 1, 0, 0, 0) from MAV_FRAME_LOCAL_NED to MAV_FRAME_BODY_FRD"]
26865    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26866    pub q: [f32; 4],
26867    #[doc = "Body roll rate"]
26868    pub body_roll_rate: f32,
26869    #[doc = "Body pitch rate"]
26870    pub body_pitch_rate: f32,
26871    #[doc = "Body yaw rate"]
26872    pub body_yaw_rate: f32,
26873    #[doc = "Collective thrust, normalized to 0 .. 1 (-1 .. 1 for vehicles capable of reverse trust)"]
26874    pub thrust: f32,
26875    #[doc = "System ID"]
26876    pub target_system: u8,
26877    #[doc = "Component ID"]
26878    pub target_component: u8,
26879    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
26880    pub type_mask: AttitudeTargetTypemask,
26881    #[doc = "3D thrust setpoint in the body NED frame, normalized to -1 .. 1"]
26882    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
26883    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
26884    pub thrust_body: [f32; 3],
26885}
26886impl SET_ATTITUDE_TARGET_DATA {
26887    pub const ENCODED_LEN: usize = 51usize;
26888    pub const DEFAULT: Self = Self {
26889        time_boot_ms: 0_u32,
26890        q: [0.0_f32; 4usize],
26891        body_roll_rate: 0.0_f32,
26892        body_pitch_rate: 0.0_f32,
26893        body_yaw_rate: 0.0_f32,
26894        thrust: 0.0_f32,
26895        target_system: 0_u8,
26896        target_component: 0_u8,
26897        type_mask: AttitudeTargetTypemask::DEFAULT,
26898        thrust_body: [0.0_f32; 3usize],
26899    };
26900    #[cfg(feature = "arbitrary")]
26901    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
26902        use arbitrary::{Arbitrary, Unstructured};
26903        let mut buf = [0u8; 1024];
26904        rng.fill_bytes(&mut buf);
26905        let mut unstructured = Unstructured::new(&buf);
26906        Self::arbitrary(&mut unstructured).unwrap_or_default()
26907    }
26908}
26909impl Default for SET_ATTITUDE_TARGET_DATA {
26910    fn default() -> Self {
26911        Self::DEFAULT.clone()
26912    }
26913}
26914impl MessageData for SET_ATTITUDE_TARGET_DATA {
26915    type Message = MavMessage;
26916    const ID: u32 = 82u32;
26917    const NAME: &'static str = "SET_ATTITUDE_TARGET";
26918    const EXTRA_CRC: u8 = 49u8;
26919    const ENCODED_LEN: usize = 51usize;
26920    fn deser(
26921        _version: MavlinkVersion,
26922        __input: &[u8],
26923    ) -> Result<Self, ::mavlink_core::error::ParserError> {
26924        let avail_len = __input.len();
26925        let mut payload_buf = [0; Self::ENCODED_LEN];
26926        let mut buf = if avail_len < Self::ENCODED_LEN {
26927            payload_buf[0..avail_len].copy_from_slice(__input);
26928            Bytes::new(&payload_buf)
26929        } else {
26930            Bytes::new(__input)
26931        };
26932        let mut __struct = Self::default();
26933        __struct.time_boot_ms = buf.get_u32_le();
26934        for v in &mut __struct.q {
26935            let val = buf.get_f32_le();
26936            *v = val;
26937        }
26938        __struct.body_roll_rate = buf.get_f32_le();
26939        __struct.body_pitch_rate = buf.get_f32_le();
26940        __struct.body_yaw_rate = buf.get_f32_le();
26941        __struct.thrust = buf.get_f32_le();
26942        __struct.target_system = buf.get_u8();
26943        __struct.target_component = buf.get_u8();
26944        let tmp = buf.get_u8();
26945        __struct.type_mask = AttitudeTargetTypemask::from_bits(
26946            tmp & AttitudeTargetTypemask::all().bits(),
26947        )
26948        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
26949            flag_type: "AttitudeTargetTypemask",
26950            value: tmp as u32,
26951        })?;
26952        for v in &mut __struct.thrust_body {
26953            let val = buf.get_f32_le();
26954            *v = val;
26955        }
26956        Ok(__struct)
26957    }
26958    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
26959        let mut __tmp = BytesMut::new(bytes);
26960        #[allow(clippy::absurd_extreme_comparisons)]
26961        #[allow(unused_comparisons)]
26962        if __tmp.remaining() < Self::ENCODED_LEN {
26963            panic!(
26964                "buffer is too small (need {} bytes, but got {})",
26965                Self::ENCODED_LEN,
26966                __tmp.remaining(),
26967            )
26968        }
26969        __tmp.put_u32_le(self.time_boot_ms);
26970        for val in &self.q {
26971            __tmp.put_f32_le(*val);
26972        }
26973        __tmp.put_f32_le(self.body_roll_rate);
26974        __tmp.put_f32_le(self.body_pitch_rate);
26975        __tmp.put_f32_le(self.body_yaw_rate);
26976        __tmp.put_f32_le(self.thrust);
26977        __tmp.put_u8(self.target_system);
26978        __tmp.put_u8(self.target_component);
26979        __tmp.put_u8(self.type_mask.bits());
26980        for val in &self.thrust_body {
26981            __tmp.put_f32_le(*val);
26982        }
26983        if matches!(version, MavlinkVersion::V2) {
26984            let len = __tmp.len();
26985            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
26986        } else {
26987            __tmp.len()
26988        }
26989    }
26990}
26991#[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
26992#[doc = "id: 48"]
26993#[doc = "Sets the GPS coordinates of the vehicle local origin (0,0,0) position. Vehicle should emit GPS_GLOBAL_ORIGIN irrespective of whether the origin is changed. This enables transform between the local coordinate frame and the global (GPS) coordinate frame, which may be necessary when (for example) indoor and outdoor settings are connected and the MAV should move from in- to outdoor."]
26994#[derive(Debug, Clone, PartialEq)]
26995#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
26996#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
26997pub struct SET_GPS_GLOBAL_ORIGIN_DATA {
26998    #[doc = "Latitude (WGS84)"]
26999    pub latitude: i32,
27000    #[doc = "Longitude (WGS84)"]
27001    pub longitude: i32,
27002    #[doc = "Altitude (MSL). Positive for up."]
27003    pub altitude: i32,
27004    #[doc = "System ID"]
27005    pub target_system: u8,
27006    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27007    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27008    pub time_usec: u64,
27009}
27010impl SET_GPS_GLOBAL_ORIGIN_DATA {
27011    pub const ENCODED_LEN: usize = 21usize;
27012    pub const DEFAULT: Self = Self {
27013        latitude: 0_i32,
27014        longitude: 0_i32,
27015        altitude: 0_i32,
27016        target_system: 0_u8,
27017        time_usec: 0_u64,
27018    };
27019    #[cfg(feature = "arbitrary")]
27020    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27021        use arbitrary::{Arbitrary, Unstructured};
27022        let mut buf = [0u8; 1024];
27023        rng.fill_bytes(&mut buf);
27024        let mut unstructured = Unstructured::new(&buf);
27025        Self::arbitrary(&mut unstructured).unwrap_or_default()
27026    }
27027}
27028impl Default for SET_GPS_GLOBAL_ORIGIN_DATA {
27029    fn default() -> Self {
27030        Self::DEFAULT.clone()
27031    }
27032}
27033impl MessageData for SET_GPS_GLOBAL_ORIGIN_DATA {
27034    type Message = MavMessage;
27035    const ID: u32 = 48u32;
27036    const NAME: &'static str = "SET_GPS_GLOBAL_ORIGIN";
27037    const EXTRA_CRC: u8 = 41u8;
27038    const ENCODED_LEN: usize = 21usize;
27039    fn deser(
27040        _version: MavlinkVersion,
27041        __input: &[u8],
27042    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27043        let avail_len = __input.len();
27044        let mut payload_buf = [0; Self::ENCODED_LEN];
27045        let mut buf = if avail_len < Self::ENCODED_LEN {
27046            payload_buf[0..avail_len].copy_from_slice(__input);
27047            Bytes::new(&payload_buf)
27048        } else {
27049            Bytes::new(__input)
27050        };
27051        let mut __struct = Self::default();
27052        __struct.latitude = buf.get_i32_le();
27053        __struct.longitude = buf.get_i32_le();
27054        __struct.altitude = buf.get_i32_le();
27055        __struct.target_system = buf.get_u8();
27056        __struct.time_usec = buf.get_u64_le();
27057        Ok(__struct)
27058    }
27059    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27060        let mut __tmp = BytesMut::new(bytes);
27061        #[allow(clippy::absurd_extreme_comparisons)]
27062        #[allow(unused_comparisons)]
27063        if __tmp.remaining() < Self::ENCODED_LEN {
27064            panic!(
27065                "buffer is too small (need {} bytes, but got {})",
27066                Self::ENCODED_LEN,
27067                __tmp.remaining(),
27068            )
27069        }
27070        __tmp.put_i32_le(self.latitude);
27071        __tmp.put_i32_le(self.longitude);
27072        __tmp.put_i32_le(self.altitude);
27073        __tmp.put_u8(self.target_system);
27074        __tmp.put_u64_le(self.time_usec);
27075        if matches!(version, MavlinkVersion::V2) {
27076            let len = __tmp.len();
27077            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27078        } else {
27079            __tmp.len()
27080        }
27081    }
27082}
27083#[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
27084#[doc = "id: 243"]
27085#[doc = "Sets the home position. \tThe home position is the default position that the system will return to and land on.         The position is set automatically by the system during the takeoff (and may also be set using this message).         The global and local positions encode the position in the respective coordinate frames, while the q parameter encodes the orientation of the surface.         Under normal conditions it describes the heading and terrain slope, which can be used by the aircraft to adjust the approach.         The approach 3D vector describes the point to which the system should fly in normal flight mode and then perform a landing sequence along the vector.         Note: the current home position may be emitted in a HOME_POSITION message on request (using MAV_CMD_REQUEST_MESSAGE with param1=242)."]
27086#[derive(Debug, Clone, PartialEq)]
27087#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27088#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27089pub struct SET_HOME_POSITION_DATA {
27090    #[doc = "Latitude (WGS84)"]
27091    pub latitude: i32,
27092    #[doc = "Longitude (WGS84)"]
27093    pub longitude: i32,
27094    #[doc = "Altitude (MSL). Positive for up."]
27095    pub altitude: i32,
27096    #[doc = "Local X position of this position in the local coordinate frame (NED)"]
27097    pub x: f32,
27098    #[doc = "Local Y position of this position in the local coordinate frame (NED)"]
27099    pub y: f32,
27100    #[doc = "Local Z position of this position in the local coordinate frame (NED: positive \"down\")"]
27101    pub z: f32,
27102    #[doc = "World to surface normal and heading transformation of the takeoff position. Used to indicate the heading and slope of the ground"]
27103    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27104    pub q: [f32; 4],
27105    #[doc = "Local X position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27106    pub approach_x: f32,
27107    #[doc = "Local Y position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27108    pub approach_y: f32,
27109    #[doc = "Local Z position of the end of the approach vector. Multicopters should set this position based on their takeoff path. Grass-landing fixed wing aircraft should set it the same way as multicopters. Runway-landing fixed wing aircraft should set it to the opposite direction of the takeoff, assuming the takeoff happened from the threshold / touchdown zone."]
27110    pub approach_z: f32,
27111    #[doc = "System ID."]
27112    pub target_system: u8,
27113    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
27114    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27115    pub time_usec: u64,
27116}
27117impl SET_HOME_POSITION_DATA {
27118    pub const ENCODED_LEN: usize = 61usize;
27119    pub const DEFAULT: Self = Self {
27120        latitude: 0_i32,
27121        longitude: 0_i32,
27122        altitude: 0_i32,
27123        x: 0.0_f32,
27124        y: 0.0_f32,
27125        z: 0.0_f32,
27126        q: [0.0_f32; 4usize],
27127        approach_x: 0.0_f32,
27128        approach_y: 0.0_f32,
27129        approach_z: 0.0_f32,
27130        target_system: 0_u8,
27131        time_usec: 0_u64,
27132    };
27133    #[cfg(feature = "arbitrary")]
27134    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27135        use arbitrary::{Arbitrary, Unstructured};
27136        let mut buf = [0u8; 1024];
27137        rng.fill_bytes(&mut buf);
27138        let mut unstructured = Unstructured::new(&buf);
27139        Self::arbitrary(&mut unstructured).unwrap_or_default()
27140    }
27141}
27142impl Default for SET_HOME_POSITION_DATA {
27143    fn default() -> Self {
27144        Self::DEFAULT.clone()
27145    }
27146}
27147impl MessageData for SET_HOME_POSITION_DATA {
27148    type Message = MavMessage;
27149    const ID: u32 = 243u32;
27150    const NAME: &'static str = "SET_HOME_POSITION";
27151    const EXTRA_CRC: u8 = 85u8;
27152    const ENCODED_LEN: usize = 61usize;
27153    fn deser(
27154        _version: MavlinkVersion,
27155        __input: &[u8],
27156    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27157        let avail_len = __input.len();
27158        let mut payload_buf = [0; Self::ENCODED_LEN];
27159        let mut buf = if avail_len < Self::ENCODED_LEN {
27160            payload_buf[0..avail_len].copy_from_slice(__input);
27161            Bytes::new(&payload_buf)
27162        } else {
27163            Bytes::new(__input)
27164        };
27165        let mut __struct = Self::default();
27166        __struct.latitude = buf.get_i32_le();
27167        __struct.longitude = buf.get_i32_le();
27168        __struct.altitude = buf.get_i32_le();
27169        __struct.x = buf.get_f32_le();
27170        __struct.y = buf.get_f32_le();
27171        __struct.z = buf.get_f32_le();
27172        for v in &mut __struct.q {
27173            let val = buf.get_f32_le();
27174            *v = val;
27175        }
27176        __struct.approach_x = buf.get_f32_le();
27177        __struct.approach_y = buf.get_f32_le();
27178        __struct.approach_z = buf.get_f32_le();
27179        __struct.target_system = buf.get_u8();
27180        __struct.time_usec = buf.get_u64_le();
27181        Ok(__struct)
27182    }
27183    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27184        let mut __tmp = BytesMut::new(bytes);
27185        #[allow(clippy::absurd_extreme_comparisons)]
27186        #[allow(unused_comparisons)]
27187        if __tmp.remaining() < Self::ENCODED_LEN {
27188            panic!(
27189                "buffer is too small (need {} bytes, but got {})",
27190                Self::ENCODED_LEN,
27191                __tmp.remaining(),
27192            )
27193        }
27194        __tmp.put_i32_le(self.latitude);
27195        __tmp.put_i32_le(self.longitude);
27196        __tmp.put_i32_le(self.altitude);
27197        __tmp.put_f32_le(self.x);
27198        __tmp.put_f32_le(self.y);
27199        __tmp.put_f32_le(self.z);
27200        for val in &self.q {
27201            __tmp.put_f32_le(*val);
27202        }
27203        __tmp.put_f32_le(self.approach_x);
27204        __tmp.put_f32_le(self.approach_y);
27205        __tmp.put_f32_le(self.approach_z);
27206        __tmp.put_u8(self.target_system);
27207        __tmp.put_u64_le(self.time_usec);
27208        if matches!(version, MavlinkVersion::V2) {
27209            let len = __tmp.len();
27210            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27211        } else {
27212            __tmp.len()
27213        }
27214    }
27215}
27216#[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
27217#[doc = "id: 11"]
27218#[doc = "Set the system mode, as defined by enum MAV_MODE. There is no target component id as the mode is by definition for the overall aircraft, not only for one component."]
27219#[derive(Debug, Clone, PartialEq)]
27220#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27221#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27222pub struct SET_MODE_DATA {
27223    #[doc = "The new autopilot-specific mode. This field can be ignored by an autopilot."]
27224    pub custom_mode: u32,
27225    #[doc = "The system setting the mode"]
27226    pub target_system: u8,
27227    #[doc = "The new base mode."]
27228    pub base_mode: MavMode,
27229}
27230impl SET_MODE_DATA {
27231    pub const ENCODED_LEN: usize = 6usize;
27232    pub const DEFAULT: Self = Self {
27233        custom_mode: 0_u32,
27234        target_system: 0_u8,
27235        base_mode: MavMode::DEFAULT,
27236    };
27237    #[cfg(feature = "arbitrary")]
27238    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27239        use arbitrary::{Arbitrary, Unstructured};
27240        let mut buf = [0u8; 1024];
27241        rng.fill_bytes(&mut buf);
27242        let mut unstructured = Unstructured::new(&buf);
27243        Self::arbitrary(&mut unstructured).unwrap_or_default()
27244    }
27245}
27246impl Default for SET_MODE_DATA {
27247    fn default() -> Self {
27248        Self::DEFAULT.clone()
27249    }
27250}
27251impl MessageData for SET_MODE_DATA {
27252    type Message = MavMessage;
27253    const ID: u32 = 11u32;
27254    const NAME: &'static str = "SET_MODE";
27255    const EXTRA_CRC: u8 = 89u8;
27256    const ENCODED_LEN: usize = 6usize;
27257    fn deser(
27258        _version: MavlinkVersion,
27259        __input: &[u8],
27260    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27261        let avail_len = __input.len();
27262        let mut payload_buf = [0; Self::ENCODED_LEN];
27263        let mut buf = if avail_len < Self::ENCODED_LEN {
27264            payload_buf[0..avail_len].copy_from_slice(__input);
27265            Bytes::new(&payload_buf)
27266        } else {
27267            Bytes::new(__input)
27268        };
27269        let mut __struct = Self::default();
27270        __struct.custom_mode = buf.get_u32_le();
27271        __struct.target_system = buf.get_u8();
27272        let tmp = buf.get_u8();
27273        __struct.base_mode =
27274            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27275                enum_type: "MavMode",
27276                value: tmp as u32,
27277            })?;
27278        Ok(__struct)
27279    }
27280    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27281        let mut __tmp = BytesMut::new(bytes);
27282        #[allow(clippy::absurd_extreme_comparisons)]
27283        #[allow(unused_comparisons)]
27284        if __tmp.remaining() < Self::ENCODED_LEN {
27285            panic!(
27286                "buffer is too small (need {} bytes, but got {})",
27287                Self::ENCODED_LEN,
27288                __tmp.remaining(),
27289            )
27290        }
27291        __tmp.put_u32_le(self.custom_mode);
27292        __tmp.put_u8(self.target_system);
27293        __tmp.put_u8(self.base_mode as u8);
27294        if matches!(version, MavlinkVersion::V2) {
27295            let len = __tmp.len();
27296            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27297        } else {
27298            __tmp.len()
27299        }
27300    }
27301}
27302#[doc = "id: 86"]
27303#[doc = "Sets a desired vehicle position, velocity, and/or acceleration in a global coordinate system (WGS84). Used by an external controller to command the vehicle (manual controller or other system)."]
27304#[derive(Debug, Clone, PartialEq)]
27305#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27306#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27307pub struct SET_POSITION_TARGET_GLOBAL_INT_DATA {
27308    #[doc = "Timestamp (time since system boot). The rationale for the timestamp in the setpoint is to allow the system to compensate for the transport delay of the setpoint. This allows the system to compensate processing latency."]
27309    pub time_boot_ms: u32,
27310    #[doc = "Latitude in WGS84 frame"]
27311    pub lat_int: i32,
27312    #[doc = "Longitude in WGS84 frame"]
27313    pub lon_int: i32,
27314    #[doc = "Altitude (MSL, Relative to home, or AGL - depending on frame)"]
27315    pub alt: f32,
27316    #[doc = "X velocity in NED frame"]
27317    pub vx: f32,
27318    #[doc = "Y velocity in NED frame"]
27319    pub vy: f32,
27320    #[doc = "Z velocity in NED frame"]
27321    pub vz: f32,
27322    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27323    pub afx: f32,
27324    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27325    pub afy: f32,
27326    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27327    pub afz: f32,
27328    #[doc = "yaw setpoint"]
27329    pub yaw: f32,
27330    #[doc = "yaw rate setpoint"]
27331    pub yaw_rate: f32,
27332    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27333    pub type_mask: PositionTargetTypemask,
27334    #[doc = "System ID"]
27335    pub target_system: u8,
27336    #[doc = "Component ID"]
27337    pub target_component: u8,
27338    #[doc = "Valid options are: MAV_FRAME_GLOBAL = 0, MAV_FRAME_GLOBAL_RELATIVE_ALT = 3, MAV_FRAME_GLOBAL_TERRAIN_ALT = 10 (MAV_FRAME_GLOBAL_INT, MAV_FRAME_GLOBAL_RELATIVE_ALT_INT, MAV_FRAME_GLOBAL_TERRAIN_ALT_INT are allowed synonyms, but have been deprecated)"]
27339    pub coordinate_frame: MavFrame,
27340}
27341impl SET_POSITION_TARGET_GLOBAL_INT_DATA {
27342    pub const ENCODED_LEN: usize = 53usize;
27343    pub const DEFAULT: Self = Self {
27344        time_boot_ms: 0_u32,
27345        lat_int: 0_i32,
27346        lon_int: 0_i32,
27347        alt: 0.0_f32,
27348        vx: 0.0_f32,
27349        vy: 0.0_f32,
27350        vz: 0.0_f32,
27351        afx: 0.0_f32,
27352        afy: 0.0_f32,
27353        afz: 0.0_f32,
27354        yaw: 0.0_f32,
27355        yaw_rate: 0.0_f32,
27356        type_mask: PositionTargetTypemask::DEFAULT,
27357        target_system: 0_u8,
27358        target_component: 0_u8,
27359        coordinate_frame: MavFrame::DEFAULT,
27360    };
27361    #[cfg(feature = "arbitrary")]
27362    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27363        use arbitrary::{Arbitrary, Unstructured};
27364        let mut buf = [0u8; 1024];
27365        rng.fill_bytes(&mut buf);
27366        let mut unstructured = Unstructured::new(&buf);
27367        Self::arbitrary(&mut unstructured).unwrap_or_default()
27368    }
27369}
27370impl Default for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27371    fn default() -> Self {
27372        Self::DEFAULT.clone()
27373    }
27374}
27375impl MessageData for SET_POSITION_TARGET_GLOBAL_INT_DATA {
27376    type Message = MavMessage;
27377    const ID: u32 = 86u32;
27378    const NAME: &'static str = "SET_POSITION_TARGET_GLOBAL_INT";
27379    const EXTRA_CRC: u8 = 5u8;
27380    const ENCODED_LEN: usize = 53usize;
27381    fn deser(
27382        _version: MavlinkVersion,
27383        __input: &[u8],
27384    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27385        let avail_len = __input.len();
27386        let mut payload_buf = [0; Self::ENCODED_LEN];
27387        let mut buf = if avail_len < Self::ENCODED_LEN {
27388            payload_buf[0..avail_len].copy_from_slice(__input);
27389            Bytes::new(&payload_buf)
27390        } else {
27391            Bytes::new(__input)
27392        };
27393        let mut __struct = Self::default();
27394        __struct.time_boot_ms = buf.get_u32_le();
27395        __struct.lat_int = buf.get_i32_le();
27396        __struct.lon_int = buf.get_i32_le();
27397        __struct.alt = buf.get_f32_le();
27398        __struct.vx = buf.get_f32_le();
27399        __struct.vy = buf.get_f32_le();
27400        __struct.vz = buf.get_f32_le();
27401        __struct.afx = buf.get_f32_le();
27402        __struct.afy = buf.get_f32_le();
27403        __struct.afz = buf.get_f32_le();
27404        __struct.yaw = buf.get_f32_le();
27405        __struct.yaw_rate = buf.get_f32_le();
27406        let tmp = buf.get_u16_le();
27407        __struct.type_mask = PositionTargetTypemask::from_bits(
27408            tmp & PositionTargetTypemask::all().bits(),
27409        )
27410        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27411            flag_type: "PositionTargetTypemask",
27412            value: tmp as u32,
27413        })?;
27414        __struct.target_system = buf.get_u8();
27415        __struct.target_component = buf.get_u8();
27416        let tmp = buf.get_u8();
27417        __struct.coordinate_frame =
27418            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27419                enum_type: "MavFrame",
27420                value: tmp as u32,
27421            })?;
27422        Ok(__struct)
27423    }
27424    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27425        let mut __tmp = BytesMut::new(bytes);
27426        #[allow(clippy::absurd_extreme_comparisons)]
27427        #[allow(unused_comparisons)]
27428        if __tmp.remaining() < Self::ENCODED_LEN {
27429            panic!(
27430                "buffer is too small (need {} bytes, but got {})",
27431                Self::ENCODED_LEN,
27432                __tmp.remaining(),
27433            )
27434        }
27435        __tmp.put_u32_le(self.time_boot_ms);
27436        __tmp.put_i32_le(self.lat_int);
27437        __tmp.put_i32_le(self.lon_int);
27438        __tmp.put_f32_le(self.alt);
27439        __tmp.put_f32_le(self.vx);
27440        __tmp.put_f32_le(self.vy);
27441        __tmp.put_f32_le(self.vz);
27442        __tmp.put_f32_le(self.afx);
27443        __tmp.put_f32_le(self.afy);
27444        __tmp.put_f32_le(self.afz);
27445        __tmp.put_f32_le(self.yaw);
27446        __tmp.put_f32_le(self.yaw_rate);
27447        __tmp.put_u16_le(self.type_mask.bits());
27448        __tmp.put_u8(self.target_system);
27449        __tmp.put_u8(self.target_component);
27450        __tmp.put_u8(self.coordinate_frame as u8);
27451        if matches!(version, MavlinkVersion::V2) {
27452            let len = __tmp.len();
27453            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27454        } else {
27455            __tmp.len()
27456        }
27457    }
27458}
27459#[doc = "id: 84"]
27460#[doc = "Sets a desired vehicle position in a local north-east-down coordinate frame. Used by an external controller to command the vehicle (manual controller or other system)."]
27461#[derive(Debug, Clone, PartialEq)]
27462#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27463#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27464pub struct SET_POSITION_TARGET_LOCAL_NED_DATA {
27465    #[doc = "Timestamp (time since system boot)."]
27466    pub time_boot_ms: u32,
27467    #[doc = "X Position in NED frame"]
27468    pub x: f32,
27469    #[doc = "Y Position in NED frame"]
27470    pub y: f32,
27471    #[doc = "Z Position in NED frame (note, altitude is negative in NED)"]
27472    pub z: f32,
27473    #[doc = "X velocity in NED frame"]
27474    pub vx: f32,
27475    #[doc = "Y velocity in NED frame"]
27476    pub vy: f32,
27477    #[doc = "Z velocity in NED frame"]
27478    pub vz: f32,
27479    #[doc = "X acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27480    pub afx: f32,
27481    #[doc = "Y acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27482    pub afy: f32,
27483    #[doc = "Z acceleration or force (if bit 10 of type_mask is set) in NED frame in meter / s^2 or N"]
27484    pub afz: f32,
27485    #[doc = "yaw setpoint"]
27486    pub yaw: f32,
27487    #[doc = "yaw rate setpoint"]
27488    pub yaw_rate: f32,
27489    #[doc = "Bitmap to indicate which dimensions should be ignored by the vehicle."]
27490    pub type_mask: PositionTargetTypemask,
27491    #[doc = "System ID"]
27492    pub target_system: u8,
27493    #[doc = "Component ID"]
27494    pub target_component: u8,
27495    #[doc = "Valid options are: MAV_FRAME_LOCAL_NED = 1, MAV_FRAME_LOCAL_OFFSET_NED = 7, MAV_FRAME_BODY_NED = 8, MAV_FRAME_BODY_OFFSET_NED = 9"]
27496    pub coordinate_frame: MavFrame,
27497}
27498impl SET_POSITION_TARGET_LOCAL_NED_DATA {
27499    pub const ENCODED_LEN: usize = 53usize;
27500    pub const DEFAULT: Self = Self {
27501        time_boot_ms: 0_u32,
27502        x: 0.0_f32,
27503        y: 0.0_f32,
27504        z: 0.0_f32,
27505        vx: 0.0_f32,
27506        vy: 0.0_f32,
27507        vz: 0.0_f32,
27508        afx: 0.0_f32,
27509        afy: 0.0_f32,
27510        afz: 0.0_f32,
27511        yaw: 0.0_f32,
27512        yaw_rate: 0.0_f32,
27513        type_mask: PositionTargetTypemask::DEFAULT,
27514        target_system: 0_u8,
27515        target_component: 0_u8,
27516        coordinate_frame: MavFrame::DEFAULT,
27517    };
27518    #[cfg(feature = "arbitrary")]
27519    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27520        use arbitrary::{Arbitrary, Unstructured};
27521        let mut buf = [0u8; 1024];
27522        rng.fill_bytes(&mut buf);
27523        let mut unstructured = Unstructured::new(&buf);
27524        Self::arbitrary(&mut unstructured).unwrap_or_default()
27525    }
27526}
27527impl Default for SET_POSITION_TARGET_LOCAL_NED_DATA {
27528    fn default() -> Self {
27529        Self::DEFAULT.clone()
27530    }
27531}
27532impl MessageData for SET_POSITION_TARGET_LOCAL_NED_DATA {
27533    type Message = MavMessage;
27534    const ID: u32 = 84u32;
27535    const NAME: &'static str = "SET_POSITION_TARGET_LOCAL_NED";
27536    const EXTRA_CRC: u8 = 143u8;
27537    const ENCODED_LEN: usize = 53usize;
27538    fn deser(
27539        _version: MavlinkVersion,
27540        __input: &[u8],
27541    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27542        let avail_len = __input.len();
27543        let mut payload_buf = [0; Self::ENCODED_LEN];
27544        let mut buf = if avail_len < Self::ENCODED_LEN {
27545            payload_buf[0..avail_len].copy_from_slice(__input);
27546            Bytes::new(&payload_buf)
27547        } else {
27548            Bytes::new(__input)
27549        };
27550        let mut __struct = Self::default();
27551        __struct.time_boot_ms = buf.get_u32_le();
27552        __struct.x = buf.get_f32_le();
27553        __struct.y = buf.get_f32_le();
27554        __struct.z = buf.get_f32_le();
27555        __struct.vx = buf.get_f32_le();
27556        __struct.vy = buf.get_f32_le();
27557        __struct.vz = buf.get_f32_le();
27558        __struct.afx = buf.get_f32_le();
27559        __struct.afy = buf.get_f32_le();
27560        __struct.afz = buf.get_f32_le();
27561        __struct.yaw = buf.get_f32_le();
27562        __struct.yaw_rate = buf.get_f32_le();
27563        let tmp = buf.get_u16_le();
27564        __struct.type_mask = PositionTargetTypemask::from_bits(
27565            tmp & PositionTargetTypemask::all().bits(),
27566        )
27567        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
27568            flag_type: "PositionTargetTypemask",
27569            value: tmp as u32,
27570        })?;
27571        __struct.target_system = buf.get_u8();
27572        __struct.target_component = buf.get_u8();
27573        let tmp = buf.get_u8();
27574        __struct.coordinate_frame =
27575            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27576                enum_type: "MavFrame",
27577                value: tmp as u32,
27578            })?;
27579        Ok(__struct)
27580    }
27581    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27582        let mut __tmp = BytesMut::new(bytes);
27583        #[allow(clippy::absurd_extreme_comparisons)]
27584        #[allow(unused_comparisons)]
27585        if __tmp.remaining() < Self::ENCODED_LEN {
27586            panic!(
27587                "buffer is too small (need {} bytes, but got {})",
27588                Self::ENCODED_LEN,
27589                __tmp.remaining(),
27590            )
27591        }
27592        __tmp.put_u32_le(self.time_boot_ms);
27593        __tmp.put_f32_le(self.x);
27594        __tmp.put_f32_le(self.y);
27595        __tmp.put_f32_le(self.z);
27596        __tmp.put_f32_le(self.vx);
27597        __tmp.put_f32_le(self.vy);
27598        __tmp.put_f32_le(self.vz);
27599        __tmp.put_f32_le(self.afx);
27600        __tmp.put_f32_le(self.afy);
27601        __tmp.put_f32_le(self.afz);
27602        __tmp.put_f32_le(self.yaw);
27603        __tmp.put_f32_le(self.yaw_rate);
27604        __tmp.put_u16_le(self.type_mask.bits());
27605        __tmp.put_u8(self.target_system);
27606        __tmp.put_u8(self.target_component);
27607        __tmp.put_u8(self.coordinate_frame as u8);
27608        if matches!(version, MavlinkVersion::V2) {
27609            let len = __tmp.len();
27610            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27611        } else {
27612            __tmp.len()
27613        }
27614    }
27615}
27616#[doc = "id: 108"]
27617#[doc = "Status of simulation environment, if used."]
27618#[derive(Debug, Clone, PartialEq)]
27619#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27620#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27621pub struct SIM_STATE_DATA {
27622    #[doc = "True attitude quaternion component 1, w (1 in null-rotation)"]
27623    pub q1: f32,
27624    #[doc = "True attitude quaternion component 2, x (0 in null-rotation)"]
27625    pub q2: f32,
27626    #[doc = "True attitude quaternion component 3, y (0 in null-rotation)"]
27627    pub q3: f32,
27628    #[doc = "True attitude quaternion component 4, z (0 in null-rotation)"]
27629    pub q4: f32,
27630    #[doc = "Attitude roll expressed as Euler angles, not recommended except for human-readable outputs"]
27631    pub roll: f32,
27632    #[doc = "Attitude pitch expressed as Euler angles, not recommended except for human-readable outputs"]
27633    pub pitch: f32,
27634    #[doc = "Attitude yaw expressed as Euler angles, not recommended except for human-readable outputs"]
27635    pub yaw: f32,
27636    #[doc = "X acceleration"]
27637    pub xacc: f32,
27638    #[doc = "Y acceleration"]
27639    pub yacc: f32,
27640    #[doc = "Z acceleration"]
27641    pub zacc: f32,
27642    #[doc = "Angular speed around X axis"]
27643    pub xgyro: f32,
27644    #[doc = "Angular speed around Y axis"]
27645    pub ygyro: f32,
27646    #[doc = "Angular speed around Z axis"]
27647    pub zgyro: f32,
27648    #[doc = "Latitude (lower precision). Both this and the lat_int field should be set."]
27649    pub lat: f32,
27650    #[doc = "Longitude (lower precision). Both this and the lon_int field should be set."]
27651    pub lon: f32,
27652    #[doc = "Altitude"]
27653    pub alt: f32,
27654    #[doc = "Horizontal position standard deviation"]
27655    pub std_dev_horz: f32,
27656    #[doc = "Vertical position standard deviation"]
27657    pub std_dev_vert: f32,
27658    #[doc = "True velocity in north direction in earth-fixed NED frame"]
27659    pub vn: f32,
27660    #[doc = "True velocity in east direction in earth-fixed NED frame"]
27661    pub ve: f32,
27662    #[doc = "True velocity in down direction in earth-fixed NED frame"]
27663    pub vd: f32,
27664    #[doc = "Latitude (higher precision). If 0, recipients should use the lat field value (otherwise this field is preferred)."]
27665    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27666    pub lat_int: i32,
27667    #[doc = "Longitude (higher precision). If 0, recipients should use the lon field value (otherwise this field is preferred)."]
27668    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27669    pub lon_int: i32,
27670}
27671impl SIM_STATE_DATA {
27672    pub const ENCODED_LEN: usize = 92usize;
27673    pub const DEFAULT: Self = Self {
27674        q1: 0.0_f32,
27675        q2: 0.0_f32,
27676        q3: 0.0_f32,
27677        q4: 0.0_f32,
27678        roll: 0.0_f32,
27679        pitch: 0.0_f32,
27680        yaw: 0.0_f32,
27681        xacc: 0.0_f32,
27682        yacc: 0.0_f32,
27683        zacc: 0.0_f32,
27684        xgyro: 0.0_f32,
27685        ygyro: 0.0_f32,
27686        zgyro: 0.0_f32,
27687        lat: 0.0_f32,
27688        lon: 0.0_f32,
27689        alt: 0.0_f32,
27690        std_dev_horz: 0.0_f32,
27691        std_dev_vert: 0.0_f32,
27692        vn: 0.0_f32,
27693        ve: 0.0_f32,
27694        vd: 0.0_f32,
27695        lat_int: 0_i32,
27696        lon_int: 0_i32,
27697    };
27698    #[cfg(feature = "arbitrary")]
27699    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27700        use arbitrary::{Arbitrary, Unstructured};
27701        let mut buf = [0u8; 1024];
27702        rng.fill_bytes(&mut buf);
27703        let mut unstructured = Unstructured::new(&buf);
27704        Self::arbitrary(&mut unstructured).unwrap_or_default()
27705    }
27706}
27707impl Default for SIM_STATE_DATA {
27708    fn default() -> Self {
27709        Self::DEFAULT.clone()
27710    }
27711}
27712impl MessageData for SIM_STATE_DATA {
27713    type Message = MavMessage;
27714    const ID: u32 = 108u32;
27715    const NAME: &'static str = "SIM_STATE";
27716    const EXTRA_CRC: u8 = 32u8;
27717    const ENCODED_LEN: usize = 92usize;
27718    fn deser(
27719        _version: MavlinkVersion,
27720        __input: &[u8],
27721    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27722        let avail_len = __input.len();
27723        let mut payload_buf = [0; Self::ENCODED_LEN];
27724        let mut buf = if avail_len < Self::ENCODED_LEN {
27725            payload_buf[0..avail_len].copy_from_slice(__input);
27726            Bytes::new(&payload_buf)
27727        } else {
27728            Bytes::new(__input)
27729        };
27730        let mut __struct = Self::default();
27731        __struct.q1 = buf.get_f32_le();
27732        __struct.q2 = buf.get_f32_le();
27733        __struct.q3 = buf.get_f32_le();
27734        __struct.q4 = buf.get_f32_le();
27735        __struct.roll = buf.get_f32_le();
27736        __struct.pitch = buf.get_f32_le();
27737        __struct.yaw = buf.get_f32_le();
27738        __struct.xacc = buf.get_f32_le();
27739        __struct.yacc = buf.get_f32_le();
27740        __struct.zacc = buf.get_f32_le();
27741        __struct.xgyro = buf.get_f32_le();
27742        __struct.ygyro = buf.get_f32_le();
27743        __struct.zgyro = buf.get_f32_le();
27744        __struct.lat = buf.get_f32_le();
27745        __struct.lon = buf.get_f32_le();
27746        __struct.alt = buf.get_f32_le();
27747        __struct.std_dev_horz = buf.get_f32_le();
27748        __struct.std_dev_vert = buf.get_f32_le();
27749        __struct.vn = buf.get_f32_le();
27750        __struct.ve = buf.get_f32_le();
27751        __struct.vd = buf.get_f32_le();
27752        __struct.lat_int = buf.get_i32_le();
27753        __struct.lon_int = buf.get_i32_le();
27754        Ok(__struct)
27755    }
27756    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27757        let mut __tmp = BytesMut::new(bytes);
27758        #[allow(clippy::absurd_extreme_comparisons)]
27759        #[allow(unused_comparisons)]
27760        if __tmp.remaining() < Self::ENCODED_LEN {
27761            panic!(
27762                "buffer is too small (need {} bytes, but got {})",
27763                Self::ENCODED_LEN,
27764                __tmp.remaining(),
27765            )
27766        }
27767        __tmp.put_f32_le(self.q1);
27768        __tmp.put_f32_le(self.q2);
27769        __tmp.put_f32_le(self.q3);
27770        __tmp.put_f32_le(self.q4);
27771        __tmp.put_f32_le(self.roll);
27772        __tmp.put_f32_le(self.pitch);
27773        __tmp.put_f32_le(self.yaw);
27774        __tmp.put_f32_le(self.xacc);
27775        __tmp.put_f32_le(self.yacc);
27776        __tmp.put_f32_le(self.zacc);
27777        __tmp.put_f32_le(self.xgyro);
27778        __tmp.put_f32_le(self.ygyro);
27779        __tmp.put_f32_le(self.zgyro);
27780        __tmp.put_f32_le(self.lat);
27781        __tmp.put_f32_le(self.lon);
27782        __tmp.put_f32_le(self.alt);
27783        __tmp.put_f32_le(self.std_dev_horz);
27784        __tmp.put_f32_le(self.std_dev_vert);
27785        __tmp.put_f32_le(self.vn);
27786        __tmp.put_f32_le(self.ve);
27787        __tmp.put_f32_le(self.vd);
27788        __tmp.put_i32_le(self.lat_int);
27789        __tmp.put_i32_le(self.lon_int);
27790        if matches!(version, MavlinkVersion::V2) {
27791            let len = __tmp.len();
27792            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27793        } else {
27794            __tmp.len()
27795        }
27796    }
27797}
27798#[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
27799#[doc = "id: 370"]
27800#[doc = "Smart Battery information (static/infrequent update). Use for updates from: smart battery to flight stack, flight stack to GCS. Use BATTERY_STATUS for the frequent battery updates."]
27801#[derive(Debug, Clone, PartialEq)]
27802#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27803#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27804pub struct SMART_BATTERY_INFO_DATA {
27805    #[doc = "Capacity when full according to manufacturer, -1: field not provided."]
27806    pub capacity_full_specification: i32,
27807    #[doc = "Capacity when full (accounting for battery degradation), -1: field not provided."]
27808    pub capacity_full: i32,
27809    #[doc = "Charge/discharge cycle count. UINT16_MAX: field not provided."]
27810    pub cycle_count: u16,
27811    #[doc = "Battery weight. 0: field not provided."]
27812    pub weight: u16,
27813    #[doc = "Minimum per-cell voltage when discharging. If not supplied set to UINT16_MAX value."]
27814    pub discharge_minimum_voltage: u16,
27815    #[doc = "Minimum per-cell voltage when charging. If not supplied set to UINT16_MAX value."]
27816    pub charging_minimum_voltage: u16,
27817    #[doc = "Minimum per-cell voltage when resting. If not supplied set to UINT16_MAX value."]
27818    pub resting_minimum_voltage: u16,
27819    #[doc = "Battery ID"]
27820    pub id: u8,
27821    #[doc = "Function of the battery"]
27822    pub battery_function: MavBatteryFunction,
27823    #[doc = "Type (chemistry) of the battery"]
27824    pub mavtype: MavBatteryType,
27825    #[doc = "Serial number in ASCII characters, 0 terminated. All 0: field not provided."]
27826    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27827    pub serial_number: [u8; 16],
27828    #[doc = "Static device name in ASCII characters, 0 terminated. All 0: field not provided. Encode as manufacturer name then product name separated using an underscore."]
27829    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27830    pub device_name: [u8; 50],
27831    #[doc = "Maximum per-cell voltage when charged. 0: field not provided."]
27832    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27833    pub charging_maximum_voltage: u16,
27834    #[doc = "Number of battery cells in series. 0: field not provided."]
27835    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27836    pub cells_in_series: u8,
27837    #[doc = "Maximum pack discharge current. 0: field not provided."]
27838    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27839    pub discharge_maximum_current: u32,
27840    #[doc = "Maximum pack discharge burst current. 0: field not provided."]
27841    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27842    pub discharge_maximum_burst_current: u32,
27843    #[doc = "Manufacture date (DD/MM/YYYY) in ASCII characters, 0 terminated. All 0: field not provided."]
27844    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27845    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27846    pub manufacture_date: [u8; 11],
27847}
27848impl SMART_BATTERY_INFO_DATA {
27849    pub const ENCODED_LEN: usize = 109usize;
27850    pub const DEFAULT: Self = Self {
27851        capacity_full_specification: 0_i32,
27852        capacity_full: 0_i32,
27853        cycle_count: 0_u16,
27854        weight: 0_u16,
27855        discharge_minimum_voltage: 0_u16,
27856        charging_minimum_voltage: 0_u16,
27857        resting_minimum_voltage: 0_u16,
27858        id: 0_u8,
27859        battery_function: MavBatteryFunction::DEFAULT,
27860        mavtype: MavBatteryType::DEFAULT,
27861        serial_number: [0_u8; 16usize],
27862        device_name: [0_u8; 50usize],
27863        charging_maximum_voltage: 0_u16,
27864        cells_in_series: 0_u8,
27865        discharge_maximum_current: 0_u32,
27866        discharge_maximum_burst_current: 0_u32,
27867        manufacture_date: [0_u8; 11usize],
27868    };
27869    #[cfg(feature = "arbitrary")]
27870    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
27871        use arbitrary::{Arbitrary, Unstructured};
27872        let mut buf = [0u8; 1024];
27873        rng.fill_bytes(&mut buf);
27874        let mut unstructured = Unstructured::new(&buf);
27875        Self::arbitrary(&mut unstructured).unwrap_or_default()
27876    }
27877}
27878impl Default for SMART_BATTERY_INFO_DATA {
27879    fn default() -> Self {
27880        Self::DEFAULT.clone()
27881    }
27882}
27883impl MessageData for SMART_BATTERY_INFO_DATA {
27884    type Message = MavMessage;
27885    const ID: u32 = 370u32;
27886    const NAME: &'static str = "SMART_BATTERY_INFO";
27887    const EXTRA_CRC: u8 = 75u8;
27888    const ENCODED_LEN: usize = 109usize;
27889    fn deser(
27890        _version: MavlinkVersion,
27891        __input: &[u8],
27892    ) -> Result<Self, ::mavlink_core::error::ParserError> {
27893        let avail_len = __input.len();
27894        let mut payload_buf = [0; Self::ENCODED_LEN];
27895        let mut buf = if avail_len < Self::ENCODED_LEN {
27896            payload_buf[0..avail_len].copy_from_slice(__input);
27897            Bytes::new(&payload_buf)
27898        } else {
27899            Bytes::new(__input)
27900        };
27901        let mut __struct = Self::default();
27902        __struct.capacity_full_specification = buf.get_i32_le();
27903        __struct.capacity_full = buf.get_i32_le();
27904        __struct.cycle_count = buf.get_u16_le();
27905        __struct.weight = buf.get_u16_le();
27906        __struct.discharge_minimum_voltage = buf.get_u16_le();
27907        __struct.charging_minimum_voltage = buf.get_u16_le();
27908        __struct.resting_minimum_voltage = buf.get_u16_le();
27909        __struct.id = buf.get_u8();
27910        let tmp = buf.get_u8();
27911        __struct.battery_function =
27912            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27913                enum_type: "MavBatteryFunction",
27914                value: tmp as u32,
27915            })?;
27916        let tmp = buf.get_u8();
27917        __struct.mavtype =
27918            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
27919                enum_type: "MavBatteryType",
27920                value: tmp as u32,
27921            })?;
27922        for v in &mut __struct.serial_number {
27923            let val = buf.get_u8();
27924            *v = val;
27925        }
27926        for v in &mut __struct.device_name {
27927            let val = buf.get_u8();
27928            *v = val;
27929        }
27930        __struct.charging_maximum_voltage = buf.get_u16_le();
27931        __struct.cells_in_series = buf.get_u8();
27932        __struct.discharge_maximum_current = buf.get_u32_le();
27933        __struct.discharge_maximum_burst_current = buf.get_u32_le();
27934        for v in &mut __struct.manufacture_date {
27935            let val = buf.get_u8();
27936            *v = val;
27937        }
27938        Ok(__struct)
27939    }
27940    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
27941        let mut __tmp = BytesMut::new(bytes);
27942        #[allow(clippy::absurd_extreme_comparisons)]
27943        #[allow(unused_comparisons)]
27944        if __tmp.remaining() < Self::ENCODED_LEN {
27945            panic!(
27946                "buffer is too small (need {} bytes, but got {})",
27947                Self::ENCODED_LEN,
27948                __tmp.remaining(),
27949            )
27950        }
27951        __tmp.put_i32_le(self.capacity_full_specification);
27952        __tmp.put_i32_le(self.capacity_full);
27953        __tmp.put_u16_le(self.cycle_count);
27954        __tmp.put_u16_le(self.weight);
27955        __tmp.put_u16_le(self.discharge_minimum_voltage);
27956        __tmp.put_u16_le(self.charging_minimum_voltage);
27957        __tmp.put_u16_le(self.resting_minimum_voltage);
27958        __tmp.put_u8(self.id);
27959        __tmp.put_u8(self.battery_function as u8);
27960        __tmp.put_u8(self.mavtype as u8);
27961        for val in &self.serial_number {
27962            __tmp.put_u8(*val);
27963        }
27964        for val in &self.device_name {
27965            __tmp.put_u8(*val);
27966        }
27967        __tmp.put_u16_le(self.charging_maximum_voltage);
27968        __tmp.put_u8(self.cells_in_series);
27969        __tmp.put_u32_le(self.discharge_maximum_current);
27970        __tmp.put_u32_le(self.discharge_maximum_burst_current);
27971        for val in &self.manufacture_date {
27972            __tmp.put_u8(*val);
27973        }
27974        if matches!(version, MavlinkVersion::V2) {
27975            let len = __tmp.len();
27976            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
27977        } else {
27978            __tmp.len()
27979        }
27980    }
27981}
27982#[doc = "id: 253"]
27983#[doc = "Status text message. These messages are printed in yellow in the COMM console of QGroundControl. WARNING: They consume quite some bandwidth, so use only for important status and error messages. If implemented wisely, these messages are buffered on the MCU and sent only at a limited rate (e.g. 10 Hz)."]
27984#[derive(Debug, Clone, PartialEq)]
27985#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
27986#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
27987pub struct STATUSTEXT_DATA {
27988    #[doc = "Severity of status. Relies on the definitions within RFC-5424."]
27989    pub severity: MavSeverity,
27990    #[doc = "Status text message, without null termination character"]
27991    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
27992    pub text: [u8; 50],
27993    #[doc = "Unique (opaque) identifier for this statustext message.  May be used to reassemble a logical long-statustext message from a sequence of chunks.  A value of zero indicates this is the only chunk in the sequence and the message can be emitted immediately."]
27994    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27995    pub id: u16,
27996    #[doc = "This chunk's sequence number; indexing is from zero.  Any null character in the text field is taken to mean this was the last chunk."]
27997    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
27998    pub chunk_seq: u8,
27999}
28000impl STATUSTEXT_DATA {
28001    pub const ENCODED_LEN: usize = 54usize;
28002    pub const DEFAULT: Self = Self {
28003        severity: MavSeverity::DEFAULT,
28004        text: [0_u8; 50usize],
28005        id: 0_u16,
28006        chunk_seq: 0_u8,
28007    };
28008    #[cfg(feature = "arbitrary")]
28009    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28010        use arbitrary::{Arbitrary, Unstructured};
28011        let mut buf = [0u8; 1024];
28012        rng.fill_bytes(&mut buf);
28013        let mut unstructured = Unstructured::new(&buf);
28014        Self::arbitrary(&mut unstructured).unwrap_or_default()
28015    }
28016}
28017impl Default for STATUSTEXT_DATA {
28018    fn default() -> Self {
28019        Self::DEFAULT.clone()
28020    }
28021}
28022impl MessageData for STATUSTEXT_DATA {
28023    type Message = MavMessage;
28024    const ID: u32 = 253u32;
28025    const NAME: &'static str = "STATUSTEXT";
28026    const EXTRA_CRC: u8 = 83u8;
28027    const ENCODED_LEN: usize = 54usize;
28028    fn deser(
28029        _version: MavlinkVersion,
28030        __input: &[u8],
28031    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28032        let avail_len = __input.len();
28033        let mut payload_buf = [0; Self::ENCODED_LEN];
28034        let mut buf = if avail_len < Self::ENCODED_LEN {
28035            payload_buf[0..avail_len].copy_from_slice(__input);
28036            Bytes::new(&payload_buf)
28037        } else {
28038            Bytes::new(__input)
28039        };
28040        let mut __struct = Self::default();
28041        let tmp = buf.get_u8();
28042        __struct.severity =
28043            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28044                enum_type: "MavSeverity",
28045                value: tmp as u32,
28046            })?;
28047        for v in &mut __struct.text {
28048            let val = buf.get_u8();
28049            *v = val;
28050        }
28051        __struct.id = buf.get_u16_le();
28052        __struct.chunk_seq = buf.get_u8();
28053        Ok(__struct)
28054    }
28055    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28056        let mut __tmp = BytesMut::new(bytes);
28057        #[allow(clippy::absurd_extreme_comparisons)]
28058        #[allow(unused_comparisons)]
28059        if __tmp.remaining() < Self::ENCODED_LEN {
28060            panic!(
28061                "buffer is too small (need {} bytes, but got {})",
28062                Self::ENCODED_LEN,
28063                __tmp.remaining(),
28064            )
28065        }
28066        __tmp.put_u8(self.severity as u8);
28067        for val in &self.text {
28068            __tmp.put_u8(*val);
28069        }
28070        __tmp.put_u16_le(self.id);
28071        __tmp.put_u8(self.chunk_seq);
28072        if matches!(version, MavlinkVersion::V2) {
28073            let len = __tmp.len();
28074            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28075        } else {
28076            __tmp.len()
28077        }
28078    }
28079}
28080#[doc = "id: 261"]
28081#[doc = "Information about a storage medium. This message is sent in response to a request with MAV_CMD_REQUEST_MESSAGE and whenever the status of the storage changes (STORAGE_STATUS). Use MAV_CMD_REQUEST_MESSAGE.param2 to indicate the index/id of requested storage: 0 for all, 1 for first, 2 for second, etc."]
28082#[derive(Debug, Clone, PartialEq)]
28083#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28084#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28085pub struct STORAGE_INFORMATION_DATA {
28086    #[doc = "Timestamp (time since system boot)."]
28087    pub time_boot_ms: u32,
28088    #[doc = "Total capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28089    pub total_capacity: f32,
28090    #[doc = "Used capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28091    pub used_capacity: f32,
28092    #[doc = "Available storage capacity. If storage is not ready (STORAGE_STATUS_READY) value will be ignored."]
28093    pub available_capacity: f32,
28094    #[doc = "Read speed."]
28095    pub read_speed: f32,
28096    #[doc = "Write speed."]
28097    pub write_speed: f32,
28098    #[doc = "Storage ID (1 for first, 2 for second, etc.)"]
28099    pub storage_id: u8,
28100    #[doc = "Number of storage devices"]
28101    pub storage_count: u8,
28102    #[doc = "Status of storage"]
28103    pub status: StorageStatus,
28104    #[doc = "Type of storage"]
28105    #[cfg_attr(feature = "serde", serde(default))]
28106    pub mavtype: StorageType,
28107    #[doc = "Textual storage name to be used in UI (microSD 1, Internal Memory, etc.) This is a NULL terminated string. If it is exactly 32 characters long, add a terminating NULL. If this string is empty, the generic type is shown to the user."]
28108    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28109    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28110    pub name: [u8; 32],
28111    #[doc = "Flags indicating whether this instance is preferred storage for photos, videos, etc.         Note: Implementations should initially set the flags on the system-default storage id used for saving media (if possible/supported).         This setting can then be overridden using MAV_CMD_SET_STORAGE_USAGE.         If the media usage flags are not set, a GCS may assume storage ID 1 is the default storage for all media types."]
28112    #[cfg_attr(feature = "serde", serde(default))]
28113    pub storage_usage: StorageUsageFlag,
28114}
28115impl STORAGE_INFORMATION_DATA {
28116    pub const ENCODED_LEN: usize = 61usize;
28117    pub const DEFAULT: Self = Self {
28118        time_boot_ms: 0_u32,
28119        total_capacity: 0.0_f32,
28120        used_capacity: 0.0_f32,
28121        available_capacity: 0.0_f32,
28122        read_speed: 0.0_f32,
28123        write_speed: 0.0_f32,
28124        storage_id: 0_u8,
28125        storage_count: 0_u8,
28126        status: StorageStatus::DEFAULT,
28127        mavtype: StorageType::DEFAULT,
28128        name: [0_u8; 32usize],
28129        storage_usage: StorageUsageFlag::DEFAULT,
28130    };
28131    #[cfg(feature = "arbitrary")]
28132    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28133        use arbitrary::{Arbitrary, Unstructured};
28134        let mut buf = [0u8; 1024];
28135        rng.fill_bytes(&mut buf);
28136        let mut unstructured = Unstructured::new(&buf);
28137        Self::arbitrary(&mut unstructured).unwrap_or_default()
28138    }
28139}
28140impl Default for STORAGE_INFORMATION_DATA {
28141    fn default() -> Self {
28142        Self::DEFAULT.clone()
28143    }
28144}
28145impl MessageData for STORAGE_INFORMATION_DATA {
28146    type Message = MavMessage;
28147    const ID: u32 = 261u32;
28148    const NAME: &'static str = "STORAGE_INFORMATION";
28149    const EXTRA_CRC: u8 = 179u8;
28150    const ENCODED_LEN: usize = 61usize;
28151    fn deser(
28152        _version: MavlinkVersion,
28153        __input: &[u8],
28154    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28155        let avail_len = __input.len();
28156        let mut payload_buf = [0; Self::ENCODED_LEN];
28157        let mut buf = if avail_len < Self::ENCODED_LEN {
28158            payload_buf[0..avail_len].copy_from_slice(__input);
28159            Bytes::new(&payload_buf)
28160        } else {
28161            Bytes::new(__input)
28162        };
28163        let mut __struct = Self::default();
28164        __struct.time_boot_ms = buf.get_u32_le();
28165        __struct.total_capacity = buf.get_f32_le();
28166        __struct.used_capacity = buf.get_f32_le();
28167        __struct.available_capacity = buf.get_f32_le();
28168        __struct.read_speed = buf.get_f32_le();
28169        __struct.write_speed = buf.get_f32_le();
28170        __struct.storage_id = buf.get_u8();
28171        __struct.storage_count = buf.get_u8();
28172        let tmp = buf.get_u8();
28173        __struct.status =
28174            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28175                enum_type: "StorageStatus",
28176                value: tmp as u32,
28177            })?;
28178        let tmp = buf.get_u8();
28179        __struct.mavtype =
28180            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
28181                enum_type: "StorageType",
28182                value: tmp as u32,
28183            })?;
28184        for v in &mut __struct.name {
28185            let val = buf.get_u8();
28186            *v = val;
28187        }
28188        let tmp = buf.get_u8();
28189        __struct.storage_usage = StorageUsageFlag::from_bits(tmp & StorageUsageFlag::all().bits())
28190            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28191                flag_type: "StorageUsageFlag",
28192                value: tmp as u32,
28193            })?;
28194        Ok(__struct)
28195    }
28196    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28197        let mut __tmp = BytesMut::new(bytes);
28198        #[allow(clippy::absurd_extreme_comparisons)]
28199        #[allow(unused_comparisons)]
28200        if __tmp.remaining() < Self::ENCODED_LEN {
28201            panic!(
28202                "buffer is too small (need {} bytes, but got {})",
28203                Self::ENCODED_LEN,
28204                __tmp.remaining(),
28205            )
28206        }
28207        __tmp.put_u32_le(self.time_boot_ms);
28208        __tmp.put_f32_le(self.total_capacity);
28209        __tmp.put_f32_le(self.used_capacity);
28210        __tmp.put_f32_le(self.available_capacity);
28211        __tmp.put_f32_le(self.read_speed);
28212        __tmp.put_f32_le(self.write_speed);
28213        __tmp.put_u8(self.storage_id);
28214        __tmp.put_u8(self.storage_count);
28215        __tmp.put_u8(self.status as u8);
28216        __tmp.put_u8(self.mavtype as u8);
28217        for val in &self.name {
28218            __tmp.put_u8(*val);
28219        }
28220        __tmp.put_u8(self.storage_usage.bits());
28221        if matches!(version, MavlinkVersion::V2) {
28222            let len = __tmp.len();
28223            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28224        } else {
28225            __tmp.len()
28226        }
28227    }
28228}
28229#[doc = "id: 401"]
28230#[doc = "Tune formats supported by vehicle. This should be emitted as response to MAV_CMD_REQUEST_MESSAGE."]
28231#[derive(Debug, Clone, PartialEq)]
28232#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28233#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28234pub struct SUPPORTED_TUNES_DATA {
28235    #[doc = "Bitfield of supported tune formats."]
28236    pub format: TuneFormat,
28237    #[doc = "System ID"]
28238    pub target_system: u8,
28239    #[doc = "Component ID"]
28240    pub target_component: u8,
28241}
28242impl SUPPORTED_TUNES_DATA {
28243    pub const ENCODED_LEN: usize = 6usize;
28244    pub const DEFAULT: Self = Self {
28245        format: TuneFormat::DEFAULT,
28246        target_system: 0_u8,
28247        target_component: 0_u8,
28248    };
28249    #[cfg(feature = "arbitrary")]
28250    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28251        use arbitrary::{Arbitrary, Unstructured};
28252        let mut buf = [0u8; 1024];
28253        rng.fill_bytes(&mut buf);
28254        let mut unstructured = Unstructured::new(&buf);
28255        Self::arbitrary(&mut unstructured).unwrap_or_default()
28256    }
28257}
28258impl Default for SUPPORTED_TUNES_DATA {
28259    fn default() -> Self {
28260        Self::DEFAULT.clone()
28261    }
28262}
28263impl MessageData for SUPPORTED_TUNES_DATA {
28264    type Message = MavMessage;
28265    const ID: u32 = 401u32;
28266    const NAME: &'static str = "SUPPORTED_TUNES";
28267    const EXTRA_CRC: u8 = 183u8;
28268    const ENCODED_LEN: usize = 6usize;
28269    fn deser(
28270        _version: MavlinkVersion,
28271        __input: &[u8],
28272    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28273        let avail_len = __input.len();
28274        let mut payload_buf = [0; Self::ENCODED_LEN];
28275        let mut buf = if avail_len < Self::ENCODED_LEN {
28276            payload_buf[0..avail_len].copy_from_slice(__input);
28277            Bytes::new(&payload_buf)
28278        } else {
28279            Bytes::new(__input)
28280        };
28281        let mut __struct = Self::default();
28282        let tmp = buf.get_u32_le();
28283        __struct.format = FromPrimitive::from_u32(tmp).ok_or(
28284            ::mavlink_core::error::ParserError::InvalidEnum {
28285                enum_type: "TuneFormat",
28286                value: tmp as u32,
28287            },
28288        )?;
28289        __struct.target_system = buf.get_u8();
28290        __struct.target_component = buf.get_u8();
28291        Ok(__struct)
28292    }
28293    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28294        let mut __tmp = BytesMut::new(bytes);
28295        #[allow(clippy::absurd_extreme_comparisons)]
28296        #[allow(unused_comparisons)]
28297        if __tmp.remaining() < Self::ENCODED_LEN {
28298            panic!(
28299                "buffer is too small (need {} bytes, but got {})",
28300                Self::ENCODED_LEN,
28301                __tmp.remaining(),
28302            )
28303        }
28304        __tmp.put_u32_le(self.format as u32);
28305        __tmp.put_u8(self.target_system);
28306        __tmp.put_u8(self.target_component);
28307        if matches!(version, MavlinkVersion::V2) {
28308            let len = __tmp.len();
28309            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28310        } else {
28311            __tmp.len()
28312        }
28313    }
28314}
28315#[doc = "id: 2"]
28316#[doc = "The system time is the time of the master clock.         This can be emitted by flight controllers, onboard computers, or other components in the MAVLink network.         Components that are using a less reliable time source, such as a battery-backed real time clock, can choose to match their system clock to that of a SYSTEM_TYPE that indicates a more recent time.         This allows more broadly accurate date stamping of logs, and so on.         If precise time synchronization is needed then use TIMESYNC instead."]
28317#[derive(Debug, Clone, PartialEq)]
28318#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28319#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28320pub struct SYSTEM_TIME_DATA {
28321    #[doc = "Timestamp (UNIX epoch time)."]
28322    pub time_unix_usec: u64,
28323    #[doc = "Timestamp (time since system boot)."]
28324    pub time_boot_ms: u32,
28325}
28326impl SYSTEM_TIME_DATA {
28327    pub const ENCODED_LEN: usize = 12usize;
28328    pub const DEFAULT: Self = Self {
28329        time_unix_usec: 0_u64,
28330        time_boot_ms: 0_u32,
28331    };
28332    #[cfg(feature = "arbitrary")]
28333    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28334        use arbitrary::{Arbitrary, Unstructured};
28335        let mut buf = [0u8; 1024];
28336        rng.fill_bytes(&mut buf);
28337        let mut unstructured = Unstructured::new(&buf);
28338        Self::arbitrary(&mut unstructured).unwrap_or_default()
28339    }
28340}
28341impl Default for SYSTEM_TIME_DATA {
28342    fn default() -> Self {
28343        Self::DEFAULT.clone()
28344    }
28345}
28346impl MessageData for SYSTEM_TIME_DATA {
28347    type Message = MavMessage;
28348    const ID: u32 = 2u32;
28349    const NAME: &'static str = "SYSTEM_TIME";
28350    const EXTRA_CRC: u8 = 137u8;
28351    const ENCODED_LEN: usize = 12usize;
28352    fn deser(
28353        _version: MavlinkVersion,
28354        __input: &[u8],
28355    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28356        let avail_len = __input.len();
28357        let mut payload_buf = [0; Self::ENCODED_LEN];
28358        let mut buf = if avail_len < Self::ENCODED_LEN {
28359            payload_buf[0..avail_len].copy_from_slice(__input);
28360            Bytes::new(&payload_buf)
28361        } else {
28362            Bytes::new(__input)
28363        };
28364        let mut __struct = Self::default();
28365        __struct.time_unix_usec = buf.get_u64_le();
28366        __struct.time_boot_ms = buf.get_u32_le();
28367        Ok(__struct)
28368    }
28369    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28370        let mut __tmp = BytesMut::new(bytes);
28371        #[allow(clippy::absurd_extreme_comparisons)]
28372        #[allow(unused_comparisons)]
28373        if __tmp.remaining() < Self::ENCODED_LEN {
28374            panic!(
28375                "buffer is too small (need {} bytes, but got {})",
28376                Self::ENCODED_LEN,
28377                __tmp.remaining(),
28378            )
28379        }
28380        __tmp.put_u64_le(self.time_unix_usec);
28381        __tmp.put_u32_le(self.time_boot_ms);
28382        if matches!(version, MavlinkVersion::V2) {
28383            let len = __tmp.len();
28384            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28385        } else {
28386            __tmp.len()
28387        }
28388    }
28389}
28390#[doc = "id: 1"]
28391#[doc = "The general system state. If the system is following the MAVLink standard, the system state is mainly defined by three orthogonal states/modes: The system mode, which is either LOCKED (motors shut down and locked), MANUAL (system under RC control), GUIDED (system with autonomous position control, position setpoint controlled manually) or AUTO (system guided by path/waypoint planner). The NAV_MODE defined the current flight state: LIFTOFF (often an open-loop maneuver), LANDING, WAYPOINTS or VECTOR. This represents the internal navigation state machine. The system status shows whether the system is currently active or not and if an emergency occurred. During the CRITICAL and EMERGENCY states the MAV is still considered to be active, but should start emergency procedures autonomously. After a failure occurred it should first move from active to critical to allow manual intervention and then move to emergency after a certain timeout."]
28392#[derive(Debug, Clone, PartialEq)]
28393#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28394#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28395pub struct SYS_STATUS_DATA {
28396    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28397    pub onboard_control_sensors_present: MavSysStatusSensor,
28398    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28399    pub onboard_control_sensors_enabled: MavSysStatusSensor,
28400    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28401    pub onboard_control_sensors_health: MavSysStatusSensor,
28402    #[doc = "Maximum usage in percent of the mainloop time. Values: [0-1000] - should always be below 1000"]
28403    pub load: u16,
28404    #[doc = "Battery voltage, UINT16_MAX: Voltage not sent by autopilot"]
28405    pub voltage_battery: u16,
28406    #[doc = "Battery current, -1: Current not sent by autopilot"]
28407    pub current_battery: i16,
28408    #[doc = "Communication drop rate, (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28409    pub drop_rate_comm: u16,
28410    #[doc = "Communication errors (UART, I2C, SPI, CAN), dropped packets on all links (packets that were corrupted on reception on the MAV)"]
28411    pub errors_comm: u16,
28412    #[doc = "Autopilot-specific errors"]
28413    pub errors_count1: u16,
28414    #[doc = "Autopilot-specific errors"]
28415    pub errors_count2: u16,
28416    #[doc = "Autopilot-specific errors"]
28417    pub errors_count3: u16,
28418    #[doc = "Autopilot-specific errors"]
28419    pub errors_count4: u16,
28420    #[doc = "Battery energy remaining, -1: Battery remaining energy not sent by autopilot"]
28421    pub battery_remaining: i8,
28422    #[doc = "Bitmap showing which onboard controllers and sensors are present. Value of 0: not present. Value of 1: present."]
28423    #[cfg_attr(feature = "serde", serde(default))]
28424    pub onboard_control_sensors_present_extended: MavSysStatusSensorExtended,
28425    #[doc = "Bitmap showing which onboard controllers and sensors are enabled:  Value of 0: not enabled. Value of 1: enabled."]
28426    #[cfg_attr(feature = "serde", serde(default))]
28427    pub onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended,
28428    #[doc = "Bitmap showing which onboard controllers and sensors have an error (or are operational). Value of 0: error. Value of 1: healthy."]
28429    #[cfg_attr(feature = "serde", serde(default))]
28430    pub onboard_control_sensors_health_extended: MavSysStatusSensorExtended,
28431}
28432impl SYS_STATUS_DATA {
28433    pub const ENCODED_LEN: usize = 43usize;
28434    pub const DEFAULT: Self = Self {
28435        onboard_control_sensors_present: MavSysStatusSensor::DEFAULT,
28436        onboard_control_sensors_enabled: MavSysStatusSensor::DEFAULT,
28437        onboard_control_sensors_health: MavSysStatusSensor::DEFAULT,
28438        load: 0_u16,
28439        voltage_battery: 0_u16,
28440        current_battery: 0_i16,
28441        drop_rate_comm: 0_u16,
28442        errors_comm: 0_u16,
28443        errors_count1: 0_u16,
28444        errors_count2: 0_u16,
28445        errors_count3: 0_u16,
28446        errors_count4: 0_u16,
28447        battery_remaining: 0_i8,
28448        onboard_control_sensors_present_extended: MavSysStatusSensorExtended::DEFAULT,
28449        onboard_control_sensors_enabled_extended: MavSysStatusSensorExtended::DEFAULT,
28450        onboard_control_sensors_health_extended: MavSysStatusSensorExtended::DEFAULT,
28451    };
28452    #[cfg(feature = "arbitrary")]
28453    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28454        use arbitrary::{Arbitrary, Unstructured};
28455        let mut buf = [0u8; 1024];
28456        rng.fill_bytes(&mut buf);
28457        let mut unstructured = Unstructured::new(&buf);
28458        Self::arbitrary(&mut unstructured).unwrap_or_default()
28459    }
28460}
28461impl Default for SYS_STATUS_DATA {
28462    fn default() -> Self {
28463        Self::DEFAULT.clone()
28464    }
28465}
28466impl MessageData for SYS_STATUS_DATA {
28467    type Message = MavMessage;
28468    const ID: u32 = 1u32;
28469    const NAME: &'static str = "SYS_STATUS";
28470    const EXTRA_CRC: u8 = 124u8;
28471    const ENCODED_LEN: usize = 43usize;
28472    fn deser(
28473        _version: MavlinkVersion,
28474        __input: &[u8],
28475    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28476        let avail_len = __input.len();
28477        let mut payload_buf = [0; Self::ENCODED_LEN];
28478        let mut buf = if avail_len < Self::ENCODED_LEN {
28479            payload_buf[0..avail_len].copy_from_slice(__input);
28480            Bytes::new(&payload_buf)
28481        } else {
28482            Bytes::new(__input)
28483        };
28484        let mut __struct = Self::default();
28485        let tmp = buf.get_u32_le();
28486        __struct.onboard_control_sensors_present = MavSysStatusSensor::from_bits(
28487            tmp & MavSysStatusSensor::all().bits(),
28488        )
28489        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28490            flag_type: "MavSysStatusSensor",
28491            value: tmp as u32,
28492        })?;
28493        let tmp = buf.get_u32_le();
28494        __struct.onboard_control_sensors_enabled = MavSysStatusSensor::from_bits(
28495            tmp & MavSysStatusSensor::all().bits(),
28496        )
28497        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28498            flag_type: "MavSysStatusSensor",
28499            value: tmp as u32,
28500        })?;
28501        let tmp = buf.get_u32_le();
28502        __struct.onboard_control_sensors_health = MavSysStatusSensor::from_bits(
28503            tmp & MavSysStatusSensor::all().bits(),
28504        )
28505        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28506            flag_type: "MavSysStatusSensor",
28507            value: tmp as u32,
28508        })?;
28509        __struct.load = buf.get_u16_le();
28510        __struct.voltage_battery = buf.get_u16_le();
28511        __struct.current_battery = buf.get_i16_le();
28512        __struct.drop_rate_comm = buf.get_u16_le();
28513        __struct.errors_comm = buf.get_u16_le();
28514        __struct.errors_count1 = buf.get_u16_le();
28515        __struct.errors_count2 = buf.get_u16_le();
28516        __struct.errors_count3 = buf.get_u16_le();
28517        __struct.errors_count4 = buf.get_u16_le();
28518        __struct.battery_remaining = buf.get_i8();
28519        let tmp = buf.get_u32_le();
28520        __struct.onboard_control_sensors_present_extended =
28521            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28522                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28523                flag_type: "MavSysStatusSensorExtended",
28524                value: tmp as u32,
28525            })?;
28526        let tmp = buf.get_u32_le();
28527        __struct.onboard_control_sensors_enabled_extended =
28528            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28529                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28530                flag_type: "MavSysStatusSensorExtended",
28531                value: tmp as u32,
28532            })?;
28533        let tmp = buf.get_u32_le();
28534        __struct.onboard_control_sensors_health_extended =
28535            MavSysStatusSensorExtended::from_bits(tmp & MavSysStatusSensorExtended::all().bits())
28536                .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
28537                flag_type: "MavSysStatusSensorExtended",
28538                value: tmp as u32,
28539            })?;
28540        Ok(__struct)
28541    }
28542    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28543        let mut __tmp = BytesMut::new(bytes);
28544        #[allow(clippy::absurd_extreme_comparisons)]
28545        #[allow(unused_comparisons)]
28546        if __tmp.remaining() < Self::ENCODED_LEN {
28547            panic!(
28548                "buffer is too small (need {} bytes, but got {})",
28549                Self::ENCODED_LEN,
28550                __tmp.remaining(),
28551            )
28552        }
28553        __tmp.put_u32_le(self.onboard_control_sensors_present.bits());
28554        __tmp.put_u32_le(self.onboard_control_sensors_enabled.bits());
28555        __tmp.put_u32_le(self.onboard_control_sensors_health.bits());
28556        __tmp.put_u16_le(self.load);
28557        __tmp.put_u16_le(self.voltage_battery);
28558        __tmp.put_i16_le(self.current_battery);
28559        __tmp.put_u16_le(self.drop_rate_comm);
28560        __tmp.put_u16_le(self.errors_comm);
28561        __tmp.put_u16_le(self.errors_count1);
28562        __tmp.put_u16_le(self.errors_count2);
28563        __tmp.put_u16_le(self.errors_count3);
28564        __tmp.put_u16_le(self.errors_count4);
28565        __tmp.put_i8(self.battery_remaining);
28566        __tmp.put_u32_le(self.onboard_control_sensors_present_extended.bits());
28567        __tmp.put_u32_le(self.onboard_control_sensors_enabled_extended.bits());
28568        __tmp.put_u32_le(self.onboard_control_sensors_health_extended.bits());
28569        if matches!(version, MavlinkVersion::V2) {
28570            let len = __tmp.len();
28571            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28572        } else {
28573            __tmp.len()
28574        }
28575    }
28576}
28577#[doc = "id: 135"]
28578#[doc = "Request that the vehicle report terrain height at the given location (expected response is a TERRAIN_REPORT). Used by GCS to check if vehicle has all terrain data needed for a mission."]
28579#[derive(Debug, Clone, PartialEq)]
28580#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28581#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28582pub struct TERRAIN_CHECK_DATA {
28583    #[doc = "Latitude"]
28584    pub lat: i32,
28585    #[doc = "Longitude"]
28586    pub lon: i32,
28587}
28588impl TERRAIN_CHECK_DATA {
28589    pub const ENCODED_LEN: usize = 8usize;
28590    pub const DEFAULT: Self = Self {
28591        lat: 0_i32,
28592        lon: 0_i32,
28593    };
28594    #[cfg(feature = "arbitrary")]
28595    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28596        use arbitrary::{Arbitrary, Unstructured};
28597        let mut buf = [0u8; 1024];
28598        rng.fill_bytes(&mut buf);
28599        let mut unstructured = Unstructured::new(&buf);
28600        Self::arbitrary(&mut unstructured).unwrap_or_default()
28601    }
28602}
28603impl Default for TERRAIN_CHECK_DATA {
28604    fn default() -> Self {
28605        Self::DEFAULT.clone()
28606    }
28607}
28608impl MessageData for TERRAIN_CHECK_DATA {
28609    type Message = MavMessage;
28610    const ID: u32 = 135u32;
28611    const NAME: &'static str = "TERRAIN_CHECK";
28612    const EXTRA_CRC: u8 = 203u8;
28613    const ENCODED_LEN: usize = 8usize;
28614    fn deser(
28615        _version: MavlinkVersion,
28616        __input: &[u8],
28617    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28618        let avail_len = __input.len();
28619        let mut payload_buf = [0; Self::ENCODED_LEN];
28620        let mut buf = if avail_len < Self::ENCODED_LEN {
28621            payload_buf[0..avail_len].copy_from_slice(__input);
28622            Bytes::new(&payload_buf)
28623        } else {
28624            Bytes::new(__input)
28625        };
28626        let mut __struct = Self::default();
28627        __struct.lat = buf.get_i32_le();
28628        __struct.lon = buf.get_i32_le();
28629        Ok(__struct)
28630    }
28631    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28632        let mut __tmp = BytesMut::new(bytes);
28633        #[allow(clippy::absurd_extreme_comparisons)]
28634        #[allow(unused_comparisons)]
28635        if __tmp.remaining() < Self::ENCODED_LEN {
28636            panic!(
28637                "buffer is too small (need {} bytes, but got {})",
28638                Self::ENCODED_LEN,
28639                __tmp.remaining(),
28640            )
28641        }
28642        __tmp.put_i32_le(self.lat);
28643        __tmp.put_i32_le(self.lon);
28644        if matches!(version, MavlinkVersion::V2) {
28645            let len = __tmp.len();
28646            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28647        } else {
28648            __tmp.len()
28649        }
28650    }
28651}
28652#[doc = "id: 134"]
28653#[doc = "Terrain data sent from GCS. The lat/lon and grid_spacing must be the same as a lat/lon from a TERRAIN_REQUEST. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28654#[derive(Debug, Clone, PartialEq)]
28655#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28656#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28657pub struct TERRAIN_DATA_DATA {
28658    #[doc = "Latitude of SW corner of first grid"]
28659    pub lat: i32,
28660    #[doc = "Longitude of SW corner of first grid"]
28661    pub lon: i32,
28662    #[doc = "Grid spacing"]
28663    pub grid_spacing: u16,
28664    #[doc = "Terrain data MSL"]
28665    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
28666    pub data: [i16; 16],
28667    #[doc = "bit within the terrain request mask"]
28668    pub gridbit: u8,
28669}
28670impl TERRAIN_DATA_DATA {
28671    pub const ENCODED_LEN: usize = 43usize;
28672    pub const DEFAULT: Self = Self {
28673        lat: 0_i32,
28674        lon: 0_i32,
28675        grid_spacing: 0_u16,
28676        data: [0_i16; 16usize],
28677        gridbit: 0_u8,
28678    };
28679    #[cfg(feature = "arbitrary")]
28680    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28681        use arbitrary::{Arbitrary, Unstructured};
28682        let mut buf = [0u8; 1024];
28683        rng.fill_bytes(&mut buf);
28684        let mut unstructured = Unstructured::new(&buf);
28685        Self::arbitrary(&mut unstructured).unwrap_or_default()
28686    }
28687}
28688impl Default for TERRAIN_DATA_DATA {
28689    fn default() -> Self {
28690        Self::DEFAULT.clone()
28691    }
28692}
28693impl MessageData for TERRAIN_DATA_DATA {
28694    type Message = MavMessage;
28695    const ID: u32 = 134u32;
28696    const NAME: &'static str = "TERRAIN_DATA";
28697    const EXTRA_CRC: u8 = 229u8;
28698    const ENCODED_LEN: usize = 43usize;
28699    fn deser(
28700        _version: MavlinkVersion,
28701        __input: &[u8],
28702    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28703        let avail_len = __input.len();
28704        let mut payload_buf = [0; Self::ENCODED_LEN];
28705        let mut buf = if avail_len < Self::ENCODED_LEN {
28706            payload_buf[0..avail_len].copy_from_slice(__input);
28707            Bytes::new(&payload_buf)
28708        } else {
28709            Bytes::new(__input)
28710        };
28711        let mut __struct = Self::default();
28712        __struct.lat = buf.get_i32_le();
28713        __struct.lon = buf.get_i32_le();
28714        __struct.grid_spacing = buf.get_u16_le();
28715        for v in &mut __struct.data {
28716            let val = buf.get_i16_le();
28717            *v = val;
28718        }
28719        __struct.gridbit = buf.get_u8();
28720        Ok(__struct)
28721    }
28722    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28723        let mut __tmp = BytesMut::new(bytes);
28724        #[allow(clippy::absurd_extreme_comparisons)]
28725        #[allow(unused_comparisons)]
28726        if __tmp.remaining() < Self::ENCODED_LEN {
28727            panic!(
28728                "buffer is too small (need {} bytes, but got {})",
28729                Self::ENCODED_LEN,
28730                __tmp.remaining(),
28731            )
28732        }
28733        __tmp.put_i32_le(self.lat);
28734        __tmp.put_i32_le(self.lon);
28735        __tmp.put_u16_le(self.grid_spacing);
28736        for val in &self.data {
28737            __tmp.put_i16_le(*val);
28738        }
28739        __tmp.put_u8(self.gridbit);
28740        if matches!(version, MavlinkVersion::V2) {
28741            let len = __tmp.len();
28742            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28743        } else {
28744            __tmp.len()
28745        }
28746    }
28747}
28748#[doc = "id: 136"]
28749#[doc = "Streamed from drone to report progress of terrain map download (initiated by TERRAIN_REQUEST), or sent as a response to a TERRAIN_CHECK request. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28750#[derive(Debug, Clone, PartialEq)]
28751#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28752#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28753pub struct TERRAIN_REPORT_DATA {
28754    #[doc = "Latitude"]
28755    pub lat: i32,
28756    #[doc = "Longitude"]
28757    pub lon: i32,
28758    #[doc = "Terrain height MSL"]
28759    pub terrain_height: f32,
28760    #[doc = "Current vehicle height above lat/lon terrain height"]
28761    pub current_height: f32,
28762    #[doc = "grid spacing (zero if terrain at this location unavailable)"]
28763    pub spacing: u16,
28764    #[doc = "Number of 4x4 terrain blocks waiting to be received or read from disk"]
28765    pub pending: u16,
28766    #[doc = "Number of 4x4 terrain blocks in memory"]
28767    pub loaded: u16,
28768}
28769impl TERRAIN_REPORT_DATA {
28770    pub const ENCODED_LEN: usize = 22usize;
28771    pub const DEFAULT: Self = Self {
28772        lat: 0_i32,
28773        lon: 0_i32,
28774        terrain_height: 0.0_f32,
28775        current_height: 0.0_f32,
28776        spacing: 0_u16,
28777        pending: 0_u16,
28778        loaded: 0_u16,
28779    };
28780    #[cfg(feature = "arbitrary")]
28781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28782        use arbitrary::{Arbitrary, Unstructured};
28783        let mut buf = [0u8; 1024];
28784        rng.fill_bytes(&mut buf);
28785        let mut unstructured = Unstructured::new(&buf);
28786        Self::arbitrary(&mut unstructured).unwrap_or_default()
28787    }
28788}
28789impl Default for TERRAIN_REPORT_DATA {
28790    fn default() -> Self {
28791        Self::DEFAULT.clone()
28792    }
28793}
28794impl MessageData for TERRAIN_REPORT_DATA {
28795    type Message = MavMessage;
28796    const ID: u32 = 136u32;
28797    const NAME: &'static str = "TERRAIN_REPORT";
28798    const EXTRA_CRC: u8 = 1u8;
28799    const ENCODED_LEN: usize = 22usize;
28800    fn deser(
28801        _version: MavlinkVersion,
28802        __input: &[u8],
28803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28804        let avail_len = __input.len();
28805        let mut payload_buf = [0; Self::ENCODED_LEN];
28806        let mut buf = if avail_len < Self::ENCODED_LEN {
28807            payload_buf[0..avail_len].copy_from_slice(__input);
28808            Bytes::new(&payload_buf)
28809        } else {
28810            Bytes::new(__input)
28811        };
28812        let mut __struct = Self::default();
28813        __struct.lat = buf.get_i32_le();
28814        __struct.lon = buf.get_i32_le();
28815        __struct.terrain_height = buf.get_f32_le();
28816        __struct.current_height = buf.get_f32_le();
28817        __struct.spacing = buf.get_u16_le();
28818        __struct.pending = buf.get_u16_le();
28819        __struct.loaded = buf.get_u16_le();
28820        Ok(__struct)
28821    }
28822    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28823        let mut __tmp = BytesMut::new(bytes);
28824        #[allow(clippy::absurd_extreme_comparisons)]
28825        #[allow(unused_comparisons)]
28826        if __tmp.remaining() < Self::ENCODED_LEN {
28827            panic!(
28828                "buffer is too small (need {} bytes, but got {})",
28829                Self::ENCODED_LEN,
28830                __tmp.remaining(),
28831            )
28832        }
28833        __tmp.put_i32_le(self.lat);
28834        __tmp.put_i32_le(self.lon);
28835        __tmp.put_f32_le(self.terrain_height);
28836        __tmp.put_f32_le(self.current_height);
28837        __tmp.put_u16_le(self.spacing);
28838        __tmp.put_u16_le(self.pending);
28839        __tmp.put_u16_le(self.loaded);
28840        if matches!(version, MavlinkVersion::V2) {
28841            let len = __tmp.len();
28842            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28843        } else {
28844            __tmp.len()
28845        }
28846    }
28847}
28848#[doc = "id: 133"]
28849#[doc = "Request for terrain data and terrain status. See terrain protocol docs: <https://mavlink.io/en/services/terrain.html>."]
28850#[derive(Debug, Clone, PartialEq)]
28851#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28852#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28853pub struct TERRAIN_REQUEST_DATA {
28854    #[doc = "Bitmask of requested 4x4 grids (row major 8x7 array of grids, 56 bits)"]
28855    pub mask: u64,
28856    #[doc = "Latitude of SW corner of first grid"]
28857    pub lat: i32,
28858    #[doc = "Longitude of SW corner of first grid"]
28859    pub lon: i32,
28860    #[doc = "Grid spacing"]
28861    pub grid_spacing: u16,
28862}
28863impl TERRAIN_REQUEST_DATA {
28864    pub const ENCODED_LEN: usize = 18usize;
28865    pub const DEFAULT: Self = Self {
28866        mask: 0_u64,
28867        lat: 0_i32,
28868        lon: 0_i32,
28869        grid_spacing: 0_u16,
28870    };
28871    #[cfg(feature = "arbitrary")]
28872    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28873        use arbitrary::{Arbitrary, Unstructured};
28874        let mut buf = [0u8; 1024];
28875        rng.fill_bytes(&mut buf);
28876        let mut unstructured = Unstructured::new(&buf);
28877        Self::arbitrary(&mut unstructured).unwrap_or_default()
28878    }
28879}
28880impl Default for TERRAIN_REQUEST_DATA {
28881    fn default() -> Self {
28882        Self::DEFAULT.clone()
28883    }
28884}
28885impl MessageData for TERRAIN_REQUEST_DATA {
28886    type Message = MavMessage;
28887    const ID: u32 = 133u32;
28888    const NAME: &'static str = "TERRAIN_REQUEST";
28889    const EXTRA_CRC: u8 = 6u8;
28890    const ENCODED_LEN: usize = 18usize;
28891    fn deser(
28892        _version: MavlinkVersion,
28893        __input: &[u8],
28894    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28895        let avail_len = __input.len();
28896        let mut payload_buf = [0; Self::ENCODED_LEN];
28897        let mut buf = if avail_len < Self::ENCODED_LEN {
28898            payload_buf[0..avail_len].copy_from_slice(__input);
28899            Bytes::new(&payload_buf)
28900        } else {
28901            Bytes::new(__input)
28902        };
28903        let mut __struct = Self::default();
28904        __struct.mask = buf.get_u64_le();
28905        __struct.lat = buf.get_i32_le();
28906        __struct.lon = buf.get_i32_le();
28907        __struct.grid_spacing = buf.get_u16_le();
28908        Ok(__struct)
28909    }
28910    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28911        let mut __tmp = BytesMut::new(bytes);
28912        #[allow(clippy::absurd_extreme_comparisons)]
28913        #[allow(unused_comparisons)]
28914        if __tmp.remaining() < Self::ENCODED_LEN {
28915            panic!(
28916                "buffer is too small (need {} bytes, but got {})",
28917                Self::ENCODED_LEN,
28918                __tmp.remaining(),
28919            )
28920        }
28921        __tmp.put_u64_le(self.mask);
28922        __tmp.put_i32_le(self.lat);
28923        __tmp.put_i32_le(self.lon);
28924        __tmp.put_u16_le(self.grid_spacing);
28925        if matches!(version, MavlinkVersion::V2) {
28926            let len = __tmp.len();
28927            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
28928        } else {
28929            __tmp.len()
28930        }
28931    }
28932}
28933#[doc = "id: 111"]
28934#[doc = "Time synchronization message.         The message is used for both timesync requests and responses.         The request is sent with `ts1=syncing component timestamp` and `tc1=0`, and may be broadcast or targeted to a specific system/component.         The response is sent with `ts1=syncing component timestamp` (mirror back unchanged), and `tc1=responding component timestamp`, with the `target_system` and `target_component` set to ids of the original request.         Systems can determine if they are receiving a request or response based on the value of `tc`.         If the response has `target_system==target_component==0` the remote system has not been updated to use the component IDs and cannot reliably timesync; the requestor may report an error.         Timestamps are UNIX Epoch time or time since system boot in nanoseconds (the timestamp format can be inferred by checking for the magnitude of the number; generally it doesn't matter as only the offset is used).         The message sequence is repeated numerous times with results being filtered/averaged to estimate the offset.         See also: <https://mavlink.io/en/services/timesync.html>."]
28935#[derive(Debug, Clone, PartialEq)]
28936#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
28937#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
28938pub struct TIMESYNC_DATA {
28939    #[doc = "Time sync timestamp 1. Syncing: 0. Responding: Timestamp of responding component."]
28940    pub tc1: i64,
28941    #[doc = "Time sync timestamp 2. Timestamp of syncing component (mirrored in response)."]
28942    pub ts1: i64,
28943    #[doc = "Target system id. Request: 0 (broadcast) or id of specific system. Response must contain system id of the requesting component."]
28944    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28945    pub target_system: u8,
28946    #[doc = "Target component id. Request: 0 (broadcast) or id of specific component. Response must contain component id of the requesting component."]
28947    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
28948    pub target_component: u8,
28949}
28950impl TIMESYNC_DATA {
28951    pub const ENCODED_LEN: usize = 18usize;
28952    pub const DEFAULT: Self = Self {
28953        tc1: 0_i64,
28954        ts1: 0_i64,
28955        target_system: 0_u8,
28956        target_component: 0_u8,
28957    };
28958    #[cfg(feature = "arbitrary")]
28959    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
28960        use arbitrary::{Arbitrary, Unstructured};
28961        let mut buf = [0u8; 1024];
28962        rng.fill_bytes(&mut buf);
28963        let mut unstructured = Unstructured::new(&buf);
28964        Self::arbitrary(&mut unstructured).unwrap_or_default()
28965    }
28966}
28967impl Default for TIMESYNC_DATA {
28968    fn default() -> Self {
28969        Self::DEFAULT.clone()
28970    }
28971}
28972impl MessageData for TIMESYNC_DATA {
28973    type Message = MavMessage;
28974    const ID: u32 = 111u32;
28975    const NAME: &'static str = "TIMESYNC";
28976    const EXTRA_CRC: u8 = 34u8;
28977    const ENCODED_LEN: usize = 18usize;
28978    fn deser(
28979        _version: MavlinkVersion,
28980        __input: &[u8],
28981    ) -> Result<Self, ::mavlink_core::error::ParserError> {
28982        let avail_len = __input.len();
28983        let mut payload_buf = [0; Self::ENCODED_LEN];
28984        let mut buf = if avail_len < Self::ENCODED_LEN {
28985            payload_buf[0..avail_len].copy_from_slice(__input);
28986            Bytes::new(&payload_buf)
28987        } else {
28988            Bytes::new(__input)
28989        };
28990        let mut __struct = Self::default();
28991        __struct.tc1 = buf.get_i64_le();
28992        __struct.ts1 = buf.get_i64_le();
28993        __struct.target_system = buf.get_u8();
28994        __struct.target_component = buf.get_u8();
28995        Ok(__struct)
28996    }
28997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
28998        let mut __tmp = BytesMut::new(bytes);
28999        #[allow(clippy::absurd_extreme_comparisons)]
29000        #[allow(unused_comparisons)]
29001        if __tmp.remaining() < Self::ENCODED_LEN {
29002            panic!(
29003                "buffer is too small (need {} bytes, but got {})",
29004                Self::ENCODED_LEN,
29005                __tmp.remaining(),
29006            )
29007        }
29008        __tmp.put_i64_le(self.tc1);
29009        __tmp.put_i64_le(self.ts1);
29010        __tmp.put_u8(self.target_system);
29011        __tmp.put_u8(self.target_component);
29012        if matches!(version, MavlinkVersion::V2) {
29013            let len = __tmp.len();
29014            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29015        } else {
29016            __tmp.len()
29017        }
29018    }
29019}
29020#[doc = "id: 380"]
29021#[doc = "Time/duration estimates for various events and actions given the current vehicle state and position."]
29022#[derive(Debug, Clone, PartialEq)]
29023#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29024#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29025pub struct TIME_ESTIMATE_TO_TARGET_DATA {
29026    #[doc = "Estimated time to complete the vehicle's configured \"safe return\" action from its current position (e.g. RTL, Smart RTL, etc.). -1 indicates that the vehicle is landed, or that no time estimate available."]
29027    pub safe_return: i32,
29028    #[doc = "Estimated time for vehicle to complete the LAND action from its current position. -1 indicates that the vehicle is landed, or that no time estimate available."]
29029    pub land: i32,
29030    #[doc = "Estimated time for reaching/completing the currently active mission item. -1 means no time estimate available."]
29031    pub mission_next_item: i32,
29032    #[doc = "Estimated time for completing the current mission. -1 means no mission active and/or no estimate available."]
29033    pub mission_end: i32,
29034    #[doc = "Estimated time for completing the current commanded action (i.e. Go To, Takeoff, Land, etc.). -1 means no action active and/or no estimate available."]
29035    pub commanded_action: i32,
29036}
29037impl TIME_ESTIMATE_TO_TARGET_DATA {
29038    pub const ENCODED_LEN: usize = 20usize;
29039    pub const DEFAULT: Self = Self {
29040        safe_return: 0_i32,
29041        land: 0_i32,
29042        mission_next_item: 0_i32,
29043        mission_end: 0_i32,
29044        commanded_action: 0_i32,
29045    };
29046    #[cfg(feature = "arbitrary")]
29047    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29048        use arbitrary::{Arbitrary, Unstructured};
29049        let mut buf = [0u8; 1024];
29050        rng.fill_bytes(&mut buf);
29051        let mut unstructured = Unstructured::new(&buf);
29052        Self::arbitrary(&mut unstructured).unwrap_or_default()
29053    }
29054}
29055impl Default for TIME_ESTIMATE_TO_TARGET_DATA {
29056    fn default() -> Self {
29057        Self::DEFAULT.clone()
29058    }
29059}
29060impl MessageData for TIME_ESTIMATE_TO_TARGET_DATA {
29061    type Message = MavMessage;
29062    const ID: u32 = 380u32;
29063    const NAME: &'static str = "TIME_ESTIMATE_TO_TARGET";
29064    const EXTRA_CRC: u8 = 232u8;
29065    const ENCODED_LEN: usize = 20usize;
29066    fn deser(
29067        _version: MavlinkVersion,
29068        __input: &[u8],
29069    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29070        let avail_len = __input.len();
29071        let mut payload_buf = [0; Self::ENCODED_LEN];
29072        let mut buf = if avail_len < Self::ENCODED_LEN {
29073            payload_buf[0..avail_len].copy_from_slice(__input);
29074            Bytes::new(&payload_buf)
29075        } else {
29076            Bytes::new(__input)
29077        };
29078        let mut __struct = Self::default();
29079        __struct.safe_return = buf.get_i32_le();
29080        __struct.land = buf.get_i32_le();
29081        __struct.mission_next_item = buf.get_i32_le();
29082        __struct.mission_end = buf.get_i32_le();
29083        __struct.commanded_action = buf.get_i32_le();
29084        Ok(__struct)
29085    }
29086    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29087        let mut __tmp = BytesMut::new(bytes);
29088        #[allow(clippy::absurd_extreme_comparisons)]
29089        #[allow(unused_comparisons)]
29090        if __tmp.remaining() < Self::ENCODED_LEN {
29091            panic!(
29092                "buffer is too small (need {} bytes, but got {})",
29093                Self::ENCODED_LEN,
29094                __tmp.remaining(),
29095            )
29096        }
29097        __tmp.put_i32_le(self.safe_return);
29098        __tmp.put_i32_le(self.land);
29099        __tmp.put_i32_le(self.mission_next_item);
29100        __tmp.put_i32_le(self.mission_end);
29101        __tmp.put_i32_le(self.commanded_action);
29102        if matches!(version, MavlinkVersion::V2) {
29103            let len = __tmp.len();
29104            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29105        } else {
29106            __tmp.len()
29107        }
29108    }
29109}
29110#[doc = "id: 333"]
29111#[doc = "Describe a trajectory using an array of up-to 5 bezier control points in the local frame (MAV_FRAME_LOCAL_NED)."]
29112#[derive(Debug, Clone, PartialEq)]
29113#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29114#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29115pub struct TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29116    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29117    pub time_usec: u64,
29118    #[doc = "X-coordinate of bezier control points. Set to NaN if not being used"]
29119    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29120    pub pos_x: [f32; 5],
29121    #[doc = "Y-coordinate of bezier control points. Set to NaN if not being used"]
29122    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29123    pub pos_y: [f32; 5],
29124    #[doc = "Z-coordinate of bezier control points. Set to NaN if not being used"]
29125    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29126    pub pos_z: [f32; 5],
29127    #[doc = "Bezier time horizon. Set to NaN if velocity/acceleration should not be incorporated"]
29128    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29129    pub delta: [f32; 5],
29130    #[doc = "Yaw. Set to NaN for unchanged"]
29131    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29132    pub pos_yaw: [f32; 5],
29133    #[doc = "Number of valid control points (up-to 5 points are possible)"]
29134    pub valid_points: u8,
29135}
29136impl TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29137    pub const ENCODED_LEN: usize = 109usize;
29138    pub const DEFAULT: Self = Self {
29139        time_usec: 0_u64,
29140        pos_x: [0.0_f32; 5usize],
29141        pos_y: [0.0_f32; 5usize],
29142        pos_z: [0.0_f32; 5usize],
29143        delta: [0.0_f32; 5usize],
29144        pos_yaw: [0.0_f32; 5usize],
29145        valid_points: 0_u8,
29146    };
29147    #[cfg(feature = "arbitrary")]
29148    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29149        use arbitrary::{Arbitrary, Unstructured};
29150        let mut buf = [0u8; 1024];
29151        rng.fill_bytes(&mut buf);
29152        let mut unstructured = Unstructured::new(&buf);
29153        Self::arbitrary(&mut unstructured).unwrap_or_default()
29154    }
29155}
29156impl Default for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29157    fn default() -> Self {
29158        Self::DEFAULT.clone()
29159    }
29160}
29161impl MessageData for TRAJECTORY_REPRESENTATION_BEZIER_DATA {
29162    type Message = MavMessage;
29163    const ID: u32 = 333u32;
29164    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_BEZIER";
29165    const EXTRA_CRC: u8 = 231u8;
29166    const ENCODED_LEN: usize = 109usize;
29167    fn deser(
29168        _version: MavlinkVersion,
29169        __input: &[u8],
29170    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29171        let avail_len = __input.len();
29172        let mut payload_buf = [0; Self::ENCODED_LEN];
29173        let mut buf = if avail_len < Self::ENCODED_LEN {
29174            payload_buf[0..avail_len].copy_from_slice(__input);
29175            Bytes::new(&payload_buf)
29176        } else {
29177            Bytes::new(__input)
29178        };
29179        let mut __struct = Self::default();
29180        __struct.time_usec = buf.get_u64_le();
29181        for v in &mut __struct.pos_x {
29182            let val = buf.get_f32_le();
29183            *v = val;
29184        }
29185        for v in &mut __struct.pos_y {
29186            let val = buf.get_f32_le();
29187            *v = val;
29188        }
29189        for v in &mut __struct.pos_z {
29190            let val = buf.get_f32_le();
29191            *v = val;
29192        }
29193        for v in &mut __struct.delta {
29194            let val = buf.get_f32_le();
29195            *v = val;
29196        }
29197        for v in &mut __struct.pos_yaw {
29198            let val = buf.get_f32_le();
29199            *v = val;
29200        }
29201        __struct.valid_points = buf.get_u8();
29202        Ok(__struct)
29203    }
29204    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29205        let mut __tmp = BytesMut::new(bytes);
29206        #[allow(clippy::absurd_extreme_comparisons)]
29207        #[allow(unused_comparisons)]
29208        if __tmp.remaining() < Self::ENCODED_LEN {
29209            panic!(
29210                "buffer is too small (need {} bytes, but got {})",
29211                Self::ENCODED_LEN,
29212                __tmp.remaining(),
29213            )
29214        }
29215        __tmp.put_u64_le(self.time_usec);
29216        for val in &self.pos_x {
29217            __tmp.put_f32_le(*val);
29218        }
29219        for val in &self.pos_y {
29220            __tmp.put_f32_le(*val);
29221        }
29222        for val in &self.pos_z {
29223            __tmp.put_f32_le(*val);
29224        }
29225        for val in &self.delta {
29226            __tmp.put_f32_le(*val);
29227        }
29228        for val in &self.pos_yaw {
29229            __tmp.put_f32_le(*val);
29230        }
29231        __tmp.put_u8(self.valid_points);
29232        if matches!(version, MavlinkVersion::V2) {
29233            let len = __tmp.len();
29234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29235        } else {
29236            __tmp.len()
29237        }
29238    }
29239}
29240#[doc = "id: 332"]
29241#[doc = "Describe a trajectory using an array of up-to 5 waypoints in the local frame (MAV_FRAME_LOCAL_NED)."]
29242#[derive(Debug, Clone, PartialEq)]
29243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29245pub struct TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29246    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29247    pub time_usec: u64,
29248    #[doc = "X-coordinate of waypoint, set to NaN if not being used"]
29249    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29250    pub pos_x: [f32; 5],
29251    #[doc = "Y-coordinate of waypoint, set to NaN if not being used"]
29252    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29253    pub pos_y: [f32; 5],
29254    #[doc = "Z-coordinate of waypoint, set to NaN if not being used"]
29255    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29256    pub pos_z: [f32; 5],
29257    #[doc = "X-velocity of waypoint, set to NaN if not being used"]
29258    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29259    pub vel_x: [f32; 5],
29260    #[doc = "Y-velocity of waypoint, set to NaN if not being used"]
29261    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29262    pub vel_y: [f32; 5],
29263    #[doc = "Z-velocity of waypoint, set to NaN if not being used"]
29264    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29265    pub vel_z: [f32; 5],
29266    #[doc = "X-acceleration of waypoint, set to NaN if not being used"]
29267    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29268    pub acc_x: [f32; 5],
29269    #[doc = "Y-acceleration of waypoint, set to NaN if not being used"]
29270    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29271    pub acc_y: [f32; 5],
29272    #[doc = "Z-acceleration of waypoint, set to NaN if not being used"]
29273    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29274    pub acc_z: [f32; 5],
29275    #[doc = "Yaw angle, set to NaN if not being used"]
29276    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29277    pub pos_yaw: [f32; 5],
29278    #[doc = "Yaw rate, set to NaN if not being used"]
29279    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29280    pub vel_yaw: [f32; 5],
29281    #[doc = "MAV_CMD command id of waypoint, set to UINT16_MAX if not being used."]
29282    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29283    pub command: [u16; 5],
29284    #[doc = "Number of valid points (up-to 5 waypoints are possible)"]
29285    pub valid_points: u8,
29286}
29287impl TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29288    pub const ENCODED_LEN: usize = 239usize;
29289    pub const DEFAULT: Self = Self {
29290        time_usec: 0_u64,
29291        pos_x: [0.0_f32; 5usize],
29292        pos_y: [0.0_f32; 5usize],
29293        pos_z: [0.0_f32; 5usize],
29294        vel_x: [0.0_f32; 5usize],
29295        vel_y: [0.0_f32; 5usize],
29296        vel_z: [0.0_f32; 5usize],
29297        acc_x: [0.0_f32; 5usize],
29298        acc_y: [0.0_f32; 5usize],
29299        acc_z: [0.0_f32; 5usize],
29300        pos_yaw: [0.0_f32; 5usize],
29301        vel_yaw: [0.0_f32; 5usize],
29302        command: [0_u16; 5usize],
29303        valid_points: 0_u8,
29304    };
29305    #[cfg(feature = "arbitrary")]
29306    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29307        use arbitrary::{Arbitrary, Unstructured};
29308        let mut buf = [0u8; 1024];
29309        rng.fill_bytes(&mut buf);
29310        let mut unstructured = Unstructured::new(&buf);
29311        Self::arbitrary(&mut unstructured).unwrap_or_default()
29312    }
29313}
29314impl Default for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29315    fn default() -> Self {
29316        Self::DEFAULT.clone()
29317    }
29318}
29319impl MessageData for TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA {
29320    type Message = MavMessage;
29321    const ID: u32 = 332u32;
29322    const NAME: &'static str = "TRAJECTORY_REPRESENTATION_WAYPOINTS";
29323    const EXTRA_CRC: u8 = 236u8;
29324    const ENCODED_LEN: usize = 239usize;
29325    fn deser(
29326        _version: MavlinkVersion,
29327        __input: &[u8],
29328    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29329        let avail_len = __input.len();
29330        let mut payload_buf = [0; Self::ENCODED_LEN];
29331        let mut buf = if avail_len < Self::ENCODED_LEN {
29332            payload_buf[0..avail_len].copy_from_slice(__input);
29333            Bytes::new(&payload_buf)
29334        } else {
29335            Bytes::new(__input)
29336        };
29337        let mut __struct = Self::default();
29338        __struct.time_usec = buf.get_u64_le();
29339        for v in &mut __struct.pos_x {
29340            let val = buf.get_f32_le();
29341            *v = val;
29342        }
29343        for v in &mut __struct.pos_y {
29344            let val = buf.get_f32_le();
29345            *v = val;
29346        }
29347        for v in &mut __struct.pos_z {
29348            let val = buf.get_f32_le();
29349            *v = val;
29350        }
29351        for v in &mut __struct.vel_x {
29352            let val = buf.get_f32_le();
29353            *v = val;
29354        }
29355        for v in &mut __struct.vel_y {
29356            let val = buf.get_f32_le();
29357            *v = val;
29358        }
29359        for v in &mut __struct.vel_z {
29360            let val = buf.get_f32_le();
29361            *v = val;
29362        }
29363        for v in &mut __struct.acc_x {
29364            let val = buf.get_f32_le();
29365            *v = val;
29366        }
29367        for v in &mut __struct.acc_y {
29368            let val = buf.get_f32_le();
29369            *v = val;
29370        }
29371        for v in &mut __struct.acc_z {
29372            let val = buf.get_f32_le();
29373            *v = val;
29374        }
29375        for v in &mut __struct.pos_yaw {
29376            let val = buf.get_f32_le();
29377            *v = val;
29378        }
29379        for v in &mut __struct.vel_yaw {
29380            let val = buf.get_f32_le();
29381            *v = val;
29382        }
29383        for v in &mut __struct.command {
29384            let val = buf.get_u16_le();
29385            *v = val;
29386        }
29387        __struct.valid_points = buf.get_u8();
29388        Ok(__struct)
29389    }
29390    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29391        let mut __tmp = BytesMut::new(bytes);
29392        #[allow(clippy::absurd_extreme_comparisons)]
29393        #[allow(unused_comparisons)]
29394        if __tmp.remaining() < Self::ENCODED_LEN {
29395            panic!(
29396                "buffer is too small (need {} bytes, but got {})",
29397                Self::ENCODED_LEN,
29398                __tmp.remaining(),
29399            )
29400        }
29401        __tmp.put_u64_le(self.time_usec);
29402        for val in &self.pos_x {
29403            __tmp.put_f32_le(*val);
29404        }
29405        for val in &self.pos_y {
29406            __tmp.put_f32_le(*val);
29407        }
29408        for val in &self.pos_z {
29409            __tmp.put_f32_le(*val);
29410        }
29411        for val in &self.vel_x {
29412            __tmp.put_f32_le(*val);
29413        }
29414        for val in &self.vel_y {
29415            __tmp.put_f32_le(*val);
29416        }
29417        for val in &self.vel_z {
29418            __tmp.put_f32_le(*val);
29419        }
29420        for val in &self.acc_x {
29421            __tmp.put_f32_le(*val);
29422        }
29423        for val in &self.acc_y {
29424            __tmp.put_f32_le(*val);
29425        }
29426        for val in &self.acc_z {
29427            __tmp.put_f32_le(*val);
29428        }
29429        for val in &self.pos_yaw {
29430            __tmp.put_f32_le(*val);
29431        }
29432        for val in &self.vel_yaw {
29433            __tmp.put_f32_le(*val);
29434        }
29435        for val in &self.command {
29436            __tmp.put_u16_le(*val);
29437        }
29438        __tmp.put_u8(self.valid_points);
29439        if matches!(version, MavlinkVersion::V2) {
29440            let len = __tmp.len();
29441            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29442        } else {
29443            __tmp.len()
29444        }
29445    }
29446}
29447#[doc = "id: 385"]
29448#[doc = "Message for transporting \"arbitrary\" variable-length data from one component to another (broadcast is not forbidden, but discouraged). The encoding of the data is usually extension specific, i.e. determined by the source, and is usually not documented as part of the MAVLink specification."]
29449#[derive(Debug, Clone, PartialEq)]
29450#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29451#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29452pub struct TUNNEL_DATA {
29453    #[doc = "A code that identifies the content of the payload (0 for unknown, which is the default). If this code is less than 32768, it is a 'registered' payload type and the corresponding code should be added to the MAV_TUNNEL_PAYLOAD_TYPE enum. Software creators can register blocks of types as needed. Codes greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
29454    pub payload_type: MavTunnelPayloadType,
29455    #[doc = "System ID (can be 0 for broadcast, but this is discouraged)"]
29456    pub target_system: u8,
29457    #[doc = "Component ID (can be 0 for broadcast, but this is discouraged)"]
29458    pub target_component: u8,
29459    #[doc = "Length of the data transported in payload"]
29460    pub payload_length: u8,
29461    #[doc = "Variable length payload. The payload length is defined by payload_length. The entire content of this block is opaque unless you understand the encoding specified by payload_type."]
29462    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29463    pub payload: [u8; 128],
29464}
29465impl TUNNEL_DATA {
29466    pub const ENCODED_LEN: usize = 133usize;
29467    pub const DEFAULT: Self = Self {
29468        payload_type: MavTunnelPayloadType::DEFAULT,
29469        target_system: 0_u8,
29470        target_component: 0_u8,
29471        payload_length: 0_u8,
29472        payload: [0_u8; 128usize],
29473    };
29474    #[cfg(feature = "arbitrary")]
29475    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29476        use arbitrary::{Arbitrary, Unstructured};
29477        let mut buf = [0u8; 1024];
29478        rng.fill_bytes(&mut buf);
29479        let mut unstructured = Unstructured::new(&buf);
29480        Self::arbitrary(&mut unstructured).unwrap_or_default()
29481    }
29482}
29483impl Default for TUNNEL_DATA {
29484    fn default() -> Self {
29485        Self::DEFAULT.clone()
29486    }
29487}
29488impl MessageData for TUNNEL_DATA {
29489    type Message = MavMessage;
29490    const ID: u32 = 385u32;
29491    const NAME: &'static str = "TUNNEL";
29492    const EXTRA_CRC: u8 = 147u8;
29493    const ENCODED_LEN: usize = 133usize;
29494    fn deser(
29495        _version: MavlinkVersion,
29496        __input: &[u8],
29497    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29498        let avail_len = __input.len();
29499        let mut payload_buf = [0; Self::ENCODED_LEN];
29500        let mut buf = if avail_len < Self::ENCODED_LEN {
29501            payload_buf[0..avail_len].copy_from_slice(__input);
29502            Bytes::new(&payload_buf)
29503        } else {
29504            Bytes::new(__input)
29505        };
29506        let mut __struct = Self::default();
29507        let tmp = buf.get_u16_le();
29508        __struct.payload_type = FromPrimitive::from_u16(tmp).ok_or(
29509            ::mavlink_core::error::ParserError::InvalidEnum {
29510                enum_type: "MavTunnelPayloadType",
29511                value: tmp as u32,
29512            },
29513        )?;
29514        __struct.target_system = buf.get_u8();
29515        __struct.target_component = buf.get_u8();
29516        __struct.payload_length = buf.get_u8();
29517        for v in &mut __struct.payload {
29518            let val = buf.get_u8();
29519            *v = val;
29520        }
29521        Ok(__struct)
29522    }
29523    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29524        let mut __tmp = BytesMut::new(bytes);
29525        #[allow(clippy::absurd_extreme_comparisons)]
29526        #[allow(unused_comparisons)]
29527        if __tmp.remaining() < Self::ENCODED_LEN {
29528            panic!(
29529                "buffer is too small (need {} bytes, but got {})",
29530                Self::ENCODED_LEN,
29531                __tmp.remaining(),
29532            )
29533        }
29534        __tmp.put_u16_le(self.payload_type as u16);
29535        __tmp.put_u8(self.target_system);
29536        __tmp.put_u8(self.target_component);
29537        __tmp.put_u8(self.payload_length);
29538        for val in &self.payload {
29539            __tmp.put_u8(*val);
29540        }
29541        if matches!(version, MavlinkVersion::V2) {
29542            let len = __tmp.len();
29543            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29544        } else {
29545            __tmp.len()
29546        }
29547    }
29548}
29549#[doc = "id: 222"]
29550#[doc = "System status specific to ualberta uav."]
29551#[derive(Debug, Clone, PartialEq)]
29552#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29553#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29554pub struct UALBERTA_SYS_STATUS_DATA {
29555    #[doc = "System mode, see UALBERTA_AUTOPILOT_MODE ENUM"]
29556    pub mode: u8,
29557    #[doc = "Navigation mode, see UALBERTA_NAV_MODE ENUM"]
29558    pub nav_mode: u8,
29559    #[doc = "Pilot mode, see UALBERTA_PILOT_MODE"]
29560    pub pilot: u8,
29561}
29562impl UALBERTA_SYS_STATUS_DATA {
29563    pub const ENCODED_LEN: usize = 3usize;
29564    pub const DEFAULT: Self = Self {
29565        mode: 0_u8,
29566        nav_mode: 0_u8,
29567        pilot: 0_u8,
29568    };
29569    #[cfg(feature = "arbitrary")]
29570    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29571        use arbitrary::{Arbitrary, Unstructured};
29572        let mut buf = [0u8; 1024];
29573        rng.fill_bytes(&mut buf);
29574        let mut unstructured = Unstructured::new(&buf);
29575        Self::arbitrary(&mut unstructured).unwrap_or_default()
29576    }
29577}
29578impl Default for UALBERTA_SYS_STATUS_DATA {
29579    fn default() -> Self {
29580        Self::DEFAULT.clone()
29581    }
29582}
29583impl MessageData for UALBERTA_SYS_STATUS_DATA {
29584    type Message = MavMessage;
29585    const ID: u32 = 222u32;
29586    const NAME: &'static str = "UALBERTA_SYS_STATUS";
29587    const EXTRA_CRC: u8 = 15u8;
29588    const ENCODED_LEN: usize = 3usize;
29589    fn deser(
29590        _version: MavlinkVersion,
29591        __input: &[u8],
29592    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29593        let avail_len = __input.len();
29594        let mut payload_buf = [0; Self::ENCODED_LEN];
29595        let mut buf = if avail_len < Self::ENCODED_LEN {
29596            payload_buf[0..avail_len].copy_from_slice(__input);
29597            Bytes::new(&payload_buf)
29598        } else {
29599            Bytes::new(__input)
29600        };
29601        let mut __struct = Self::default();
29602        __struct.mode = buf.get_u8();
29603        __struct.nav_mode = buf.get_u8();
29604        __struct.pilot = buf.get_u8();
29605        Ok(__struct)
29606    }
29607    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29608        let mut __tmp = BytesMut::new(bytes);
29609        #[allow(clippy::absurd_extreme_comparisons)]
29610        #[allow(unused_comparisons)]
29611        if __tmp.remaining() < Self::ENCODED_LEN {
29612            panic!(
29613                "buffer is too small (need {} bytes, but got {})",
29614                Self::ENCODED_LEN,
29615                __tmp.remaining(),
29616            )
29617        }
29618        __tmp.put_u8(self.mode);
29619        __tmp.put_u8(self.nav_mode);
29620        __tmp.put_u8(self.pilot);
29621        if matches!(version, MavlinkVersion::V2) {
29622            let len = __tmp.len();
29623            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29624        } else {
29625            __tmp.len()
29626        }
29627    }
29628}
29629#[doc = "id: 311"]
29630#[doc = "General information describing a particular UAVCAN node. Please refer to the definition of the UAVCAN service \"uavcan.protocol.GetNodeInfo\" for the background information. This message should be emitted by the system whenever a new node appears online, or an existing node reboots. Additionally, it can be emitted upon request from the other end of the MAVLink channel (see MAV_CMD_UAVCAN_GET_NODE_INFO). It is also not prohibited to emit this message unconditionally at a low frequency. The UAVCAN specification is available at <http://uavcan.org>."]
29631#[derive(Debug, Clone, PartialEq)]
29632#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29633#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29634pub struct UAVCAN_NODE_INFO_DATA {
29635    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29636    pub time_usec: u64,
29637    #[doc = "Time since the start-up of the node."]
29638    pub uptime_sec: u32,
29639    #[doc = "Version control system (VCS) revision identifier (e.g. git short commit hash). 0 if unknown."]
29640    pub sw_vcs_commit: u32,
29641    #[doc = "Node name string. For example, \"sapog.px4.io\"."]
29642    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29643    pub name: [u8; 80],
29644    #[doc = "Hardware major version number."]
29645    pub hw_version_major: u8,
29646    #[doc = "Hardware minor version number."]
29647    pub hw_version_minor: u8,
29648    #[doc = "Hardware unique 128-bit ID."]
29649    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29650    pub hw_unique_id: [u8; 16],
29651    #[doc = "Software major version number."]
29652    pub sw_version_major: u8,
29653    #[doc = "Software minor version number."]
29654    pub sw_version_minor: u8,
29655}
29656impl UAVCAN_NODE_INFO_DATA {
29657    pub const ENCODED_LEN: usize = 116usize;
29658    pub const DEFAULT: Self = Self {
29659        time_usec: 0_u64,
29660        uptime_sec: 0_u32,
29661        sw_vcs_commit: 0_u32,
29662        name: [0_u8; 80usize],
29663        hw_version_major: 0_u8,
29664        hw_version_minor: 0_u8,
29665        hw_unique_id: [0_u8; 16usize],
29666        sw_version_major: 0_u8,
29667        sw_version_minor: 0_u8,
29668    };
29669    #[cfg(feature = "arbitrary")]
29670    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29671        use arbitrary::{Arbitrary, Unstructured};
29672        let mut buf = [0u8; 1024];
29673        rng.fill_bytes(&mut buf);
29674        let mut unstructured = Unstructured::new(&buf);
29675        Self::arbitrary(&mut unstructured).unwrap_or_default()
29676    }
29677}
29678impl Default for UAVCAN_NODE_INFO_DATA {
29679    fn default() -> Self {
29680        Self::DEFAULT.clone()
29681    }
29682}
29683impl MessageData for UAVCAN_NODE_INFO_DATA {
29684    type Message = MavMessage;
29685    const ID: u32 = 311u32;
29686    const NAME: &'static str = "UAVCAN_NODE_INFO";
29687    const EXTRA_CRC: u8 = 95u8;
29688    const ENCODED_LEN: usize = 116usize;
29689    fn deser(
29690        _version: MavlinkVersion,
29691        __input: &[u8],
29692    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29693        let avail_len = __input.len();
29694        let mut payload_buf = [0; Self::ENCODED_LEN];
29695        let mut buf = if avail_len < Self::ENCODED_LEN {
29696            payload_buf[0..avail_len].copy_from_slice(__input);
29697            Bytes::new(&payload_buf)
29698        } else {
29699            Bytes::new(__input)
29700        };
29701        let mut __struct = Self::default();
29702        __struct.time_usec = buf.get_u64_le();
29703        __struct.uptime_sec = buf.get_u32_le();
29704        __struct.sw_vcs_commit = buf.get_u32_le();
29705        for v in &mut __struct.name {
29706            let val = buf.get_u8();
29707            *v = val;
29708        }
29709        __struct.hw_version_major = buf.get_u8();
29710        __struct.hw_version_minor = buf.get_u8();
29711        for v in &mut __struct.hw_unique_id {
29712            let val = buf.get_u8();
29713            *v = val;
29714        }
29715        __struct.sw_version_major = buf.get_u8();
29716        __struct.sw_version_minor = buf.get_u8();
29717        Ok(__struct)
29718    }
29719    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29720        let mut __tmp = BytesMut::new(bytes);
29721        #[allow(clippy::absurd_extreme_comparisons)]
29722        #[allow(unused_comparisons)]
29723        if __tmp.remaining() < Self::ENCODED_LEN {
29724            panic!(
29725                "buffer is too small (need {} bytes, but got {})",
29726                Self::ENCODED_LEN,
29727                __tmp.remaining(),
29728            )
29729        }
29730        __tmp.put_u64_le(self.time_usec);
29731        __tmp.put_u32_le(self.uptime_sec);
29732        __tmp.put_u32_le(self.sw_vcs_commit);
29733        for val in &self.name {
29734            __tmp.put_u8(*val);
29735        }
29736        __tmp.put_u8(self.hw_version_major);
29737        __tmp.put_u8(self.hw_version_minor);
29738        for val in &self.hw_unique_id {
29739            __tmp.put_u8(*val);
29740        }
29741        __tmp.put_u8(self.sw_version_major);
29742        __tmp.put_u8(self.sw_version_minor);
29743        if matches!(version, MavlinkVersion::V2) {
29744            let len = __tmp.len();
29745            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29746        } else {
29747            __tmp.len()
29748        }
29749    }
29750}
29751#[doc = "id: 310"]
29752#[doc = "General status information of an UAVCAN node. Please refer to the definition of the UAVCAN message \"uavcan.protocol.NodeStatus\" for the background information. The UAVCAN specification is available at <http://uavcan.org>."]
29753#[derive(Debug, Clone, PartialEq)]
29754#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29755#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29756pub struct UAVCAN_NODE_STATUS_DATA {
29757    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
29758    pub time_usec: u64,
29759    #[doc = "Time since the start-up of the node."]
29760    pub uptime_sec: u32,
29761    #[doc = "Vendor-specific status information."]
29762    pub vendor_specific_status_code: u16,
29763    #[doc = "Generalized node health status."]
29764    pub health: UavcanNodeHealth,
29765    #[doc = "Generalized operating mode."]
29766    pub mode: UavcanNodeMode,
29767    #[doc = "Not used currently."]
29768    pub sub_mode: u8,
29769}
29770impl UAVCAN_NODE_STATUS_DATA {
29771    pub const ENCODED_LEN: usize = 17usize;
29772    pub const DEFAULT: Self = Self {
29773        time_usec: 0_u64,
29774        uptime_sec: 0_u32,
29775        vendor_specific_status_code: 0_u16,
29776        health: UavcanNodeHealth::DEFAULT,
29777        mode: UavcanNodeMode::DEFAULT,
29778        sub_mode: 0_u8,
29779    };
29780    #[cfg(feature = "arbitrary")]
29781    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29782        use arbitrary::{Arbitrary, Unstructured};
29783        let mut buf = [0u8; 1024];
29784        rng.fill_bytes(&mut buf);
29785        let mut unstructured = Unstructured::new(&buf);
29786        Self::arbitrary(&mut unstructured).unwrap_or_default()
29787    }
29788}
29789impl Default for UAVCAN_NODE_STATUS_DATA {
29790    fn default() -> Self {
29791        Self::DEFAULT.clone()
29792    }
29793}
29794impl MessageData for UAVCAN_NODE_STATUS_DATA {
29795    type Message = MavMessage;
29796    const ID: u32 = 310u32;
29797    const NAME: &'static str = "UAVCAN_NODE_STATUS";
29798    const EXTRA_CRC: u8 = 28u8;
29799    const ENCODED_LEN: usize = 17usize;
29800    fn deser(
29801        _version: MavlinkVersion,
29802        __input: &[u8],
29803    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29804        let avail_len = __input.len();
29805        let mut payload_buf = [0; Self::ENCODED_LEN];
29806        let mut buf = if avail_len < Self::ENCODED_LEN {
29807            payload_buf[0..avail_len].copy_from_slice(__input);
29808            Bytes::new(&payload_buf)
29809        } else {
29810            Bytes::new(__input)
29811        };
29812        let mut __struct = Self::default();
29813        __struct.time_usec = buf.get_u64_le();
29814        __struct.uptime_sec = buf.get_u32_le();
29815        __struct.vendor_specific_status_code = buf.get_u16_le();
29816        let tmp = buf.get_u8();
29817        __struct.health =
29818            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29819                enum_type: "UavcanNodeHealth",
29820                value: tmp as u32,
29821            })?;
29822        let tmp = buf.get_u8();
29823        __struct.mode =
29824            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29825                enum_type: "UavcanNodeMode",
29826                value: tmp as u32,
29827            })?;
29828        __struct.sub_mode = buf.get_u8();
29829        Ok(__struct)
29830    }
29831    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29832        let mut __tmp = BytesMut::new(bytes);
29833        #[allow(clippy::absurd_extreme_comparisons)]
29834        #[allow(unused_comparisons)]
29835        if __tmp.remaining() < Self::ENCODED_LEN {
29836            panic!(
29837                "buffer is too small (need {} bytes, but got {})",
29838                Self::ENCODED_LEN,
29839                __tmp.remaining(),
29840            )
29841        }
29842        __tmp.put_u64_le(self.time_usec);
29843        __tmp.put_u32_le(self.uptime_sec);
29844        __tmp.put_u16_le(self.vendor_specific_status_code);
29845        __tmp.put_u8(self.health as u8);
29846        __tmp.put_u8(self.mode as u8);
29847        __tmp.put_u8(self.sub_mode);
29848        if matches!(version, MavlinkVersion::V2) {
29849            let len = __tmp.len();
29850            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
29851        } else {
29852            __tmp.len()
29853        }
29854    }
29855}
29856#[doc = "id: 340"]
29857#[doc = "The global position resulting from GPS and sensor fusion."]
29858#[derive(Debug, Clone, PartialEq)]
29859#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
29860#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
29861pub struct UTM_GLOBAL_POSITION_DATA {
29862    #[doc = "Time of applicability of position (microseconds since UNIX epoch)."]
29863    pub time: u64,
29864    #[doc = "Latitude (WGS84)"]
29865    pub lat: i32,
29866    #[doc = "Longitude (WGS84)"]
29867    pub lon: i32,
29868    #[doc = "Altitude (WGS84)"]
29869    pub alt: i32,
29870    #[doc = "Altitude above ground"]
29871    pub relative_alt: i32,
29872    #[doc = "Next waypoint, latitude (WGS84)"]
29873    pub next_lat: i32,
29874    #[doc = "Next waypoint, longitude (WGS84)"]
29875    pub next_lon: i32,
29876    #[doc = "Next waypoint, altitude (WGS84)"]
29877    pub next_alt: i32,
29878    #[doc = "Ground X speed (latitude, positive north)"]
29879    pub vx: i16,
29880    #[doc = "Ground Y speed (longitude, positive east)"]
29881    pub vy: i16,
29882    #[doc = "Ground Z speed (altitude, positive down)"]
29883    pub vz: i16,
29884    #[doc = "Horizontal position uncertainty (standard deviation)"]
29885    pub h_acc: u16,
29886    #[doc = "Altitude uncertainty (standard deviation)"]
29887    pub v_acc: u16,
29888    #[doc = "Speed uncertainty (standard deviation)"]
29889    pub vel_acc: u16,
29890    #[doc = "Time until next update. Set to 0 if unknown or in data driven mode."]
29891    pub update_rate: u16,
29892    #[doc = "Unique UAS ID."]
29893    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
29894    pub uas_id: [u8; 18],
29895    #[doc = "Flight state"]
29896    pub flight_state: UtmFlightState,
29897    #[doc = "Bitwise OR combination of the data available flags."]
29898    pub flags: UtmDataAvailFlags,
29899}
29900impl UTM_GLOBAL_POSITION_DATA {
29901    pub const ENCODED_LEN: usize = 70usize;
29902    pub const DEFAULT: Self = Self {
29903        time: 0_u64,
29904        lat: 0_i32,
29905        lon: 0_i32,
29906        alt: 0_i32,
29907        relative_alt: 0_i32,
29908        next_lat: 0_i32,
29909        next_lon: 0_i32,
29910        next_alt: 0_i32,
29911        vx: 0_i16,
29912        vy: 0_i16,
29913        vz: 0_i16,
29914        h_acc: 0_u16,
29915        v_acc: 0_u16,
29916        vel_acc: 0_u16,
29917        update_rate: 0_u16,
29918        uas_id: [0_u8; 18usize],
29919        flight_state: UtmFlightState::DEFAULT,
29920        flags: UtmDataAvailFlags::DEFAULT,
29921    };
29922    #[cfg(feature = "arbitrary")]
29923    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
29924        use arbitrary::{Arbitrary, Unstructured};
29925        let mut buf = [0u8; 1024];
29926        rng.fill_bytes(&mut buf);
29927        let mut unstructured = Unstructured::new(&buf);
29928        Self::arbitrary(&mut unstructured).unwrap_or_default()
29929    }
29930}
29931impl Default for UTM_GLOBAL_POSITION_DATA {
29932    fn default() -> Self {
29933        Self::DEFAULT.clone()
29934    }
29935}
29936impl MessageData for UTM_GLOBAL_POSITION_DATA {
29937    type Message = MavMessage;
29938    const ID: u32 = 340u32;
29939    const NAME: &'static str = "UTM_GLOBAL_POSITION";
29940    const EXTRA_CRC: u8 = 99u8;
29941    const ENCODED_LEN: usize = 70usize;
29942    fn deser(
29943        _version: MavlinkVersion,
29944        __input: &[u8],
29945    ) -> Result<Self, ::mavlink_core::error::ParserError> {
29946        let avail_len = __input.len();
29947        let mut payload_buf = [0; Self::ENCODED_LEN];
29948        let mut buf = if avail_len < Self::ENCODED_LEN {
29949            payload_buf[0..avail_len].copy_from_slice(__input);
29950            Bytes::new(&payload_buf)
29951        } else {
29952            Bytes::new(__input)
29953        };
29954        let mut __struct = Self::default();
29955        __struct.time = buf.get_u64_le();
29956        __struct.lat = buf.get_i32_le();
29957        __struct.lon = buf.get_i32_le();
29958        __struct.alt = buf.get_i32_le();
29959        __struct.relative_alt = buf.get_i32_le();
29960        __struct.next_lat = buf.get_i32_le();
29961        __struct.next_lon = buf.get_i32_le();
29962        __struct.next_alt = buf.get_i32_le();
29963        __struct.vx = buf.get_i16_le();
29964        __struct.vy = buf.get_i16_le();
29965        __struct.vz = buf.get_i16_le();
29966        __struct.h_acc = buf.get_u16_le();
29967        __struct.v_acc = buf.get_u16_le();
29968        __struct.vel_acc = buf.get_u16_le();
29969        __struct.update_rate = buf.get_u16_le();
29970        for v in &mut __struct.uas_id {
29971            let val = buf.get_u8();
29972            *v = val;
29973        }
29974        let tmp = buf.get_u8();
29975        __struct.flight_state =
29976            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
29977                enum_type: "UtmFlightState",
29978                value: tmp as u32,
29979            })?;
29980        let tmp = buf.get_u8();
29981        __struct.flags = UtmDataAvailFlags::from_bits(tmp & UtmDataAvailFlags::all().bits())
29982            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
29983                flag_type: "UtmDataAvailFlags",
29984                value: tmp as u32,
29985            })?;
29986        Ok(__struct)
29987    }
29988    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
29989        let mut __tmp = BytesMut::new(bytes);
29990        #[allow(clippy::absurd_extreme_comparisons)]
29991        #[allow(unused_comparisons)]
29992        if __tmp.remaining() < Self::ENCODED_LEN {
29993            panic!(
29994                "buffer is too small (need {} bytes, but got {})",
29995                Self::ENCODED_LEN,
29996                __tmp.remaining(),
29997            )
29998        }
29999        __tmp.put_u64_le(self.time);
30000        __tmp.put_i32_le(self.lat);
30001        __tmp.put_i32_le(self.lon);
30002        __tmp.put_i32_le(self.alt);
30003        __tmp.put_i32_le(self.relative_alt);
30004        __tmp.put_i32_le(self.next_lat);
30005        __tmp.put_i32_le(self.next_lon);
30006        __tmp.put_i32_le(self.next_alt);
30007        __tmp.put_i16_le(self.vx);
30008        __tmp.put_i16_le(self.vy);
30009        __tmp.put_i16_le(self.vz);
30010        __tmp.put_u16_le(self.h_acc);
30011        __tmp.put_u16_le(self.v_acc);
30012        __tmp.put_u16_le(self.vel_acc);
30013        __tmp.put_u16_le(self.update_rate);
30014        for val in &self.uas_id {
30015            __tmp.put_u8(*val);
30016        }
30017        __tmp.put_u8(self.flight_state as u8);
30018        __tmp.put_u8(self.flags.bits());
30019        if matches!(version, MavlinkVersion::V2) {
30020            let len = __tmp.len();
30021            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30022        } else {
30023            __tmp.len()
30024        }
30025    }
30026}
30027#[doc = "id: 248"]
30028#[doc = "Message implementing parts of the V2 payload specs in V1 frames for transitional support."]
30029#[derive(Debug, Clone, PartialEq)]
30030#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30031#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30032pub struct V2_EXTENSION_DATA {
30033    #[doc = "A code that identifies the software component that understands this message (analogous to USB device classes or mime type strings). If this code is less than 32768, it is considered a 'registered' protocol extension and the corresponding entry should be added to <https://github.com/mavlink/mavlink/definition_files/extension_message_ids.xml>. Software creators can register blocks of message IDs as needed (useful for GCS specific metadata, etc...). Message_types greater than 32767 are considered local experiments and should not be checked in to any widely distributed codebase."]
30034    pub message_type: u16,
30035    #[doc = "Network ID (0 for broadcast)"]
30036    pub target_network: u8,
30037    #[doc = "System ID (0 for broadcast)"]
30038    pub target_system: u8,
30039    #[doc = "Component ID (0 for broadcast)"]
30040    pub target_component: u8,
30041    #[doc = "Variable length payload. The length must be encoded in the payload as part of the message_type protocol, e.g. by including the length as payload data, or by terminating the payload data with a non-zero marker. This is required in order to reconstruct zero-terminated payloads that are (or otherwise would be) trimmed by MAVLink 2 empty-byte truncation. The entire content of the payload block is opaque unless you understand the encoding message_type. The particular encoding used can be extension specific and might not always be documented as part of the MAVLink specification."]
30042    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30043    pub payload: [u8; 249],
30044}
30045impl V2_EXTENSION_DATA {
30046    pub const ENCODED_LEN: usize = 254usize;
30047    pub const DEFAULT: Self = Self {
30048        message_type: 0_u16,
30049        target_network: 0_u8,
30050        target_system: 0_u8,
30051        target_component: 0_u8,
30052        payload: [0_u8; 249usize],
30053    };
30054    #[cfg(feature = "arbitrary")]
30055    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30056        use arbitrary::{Arbitrary, Unstructured};
30057        let mut buf = [0u8; 1024];
30058        rng.fill_bytes(&mut buf);
30059        let mut unstructured = Unstructured::new(&buf);
30060        Self::arbitrary(&mut unstructured).unwrap_or_default()
30061    }
30062}
30063impl Default for V2_EXTENSION_DATA {
30064    fn default() -> Self {
30065        Self::DEFAULT.clone()
30066    }
30067}
30068impl MessageData for V2_EXTENSION_DATA {
30069    type Message = MavMessage;
30070    const ID: u32 = 248u32;
30071    const NAME: &'static str = "V2_EXTENSION";
30072    const EXTRA_CRC: u8 = 8u8;
30073    const ENCODED_LEN: usize = 254usize;
30074    fn deser(
30075        _version: MavlinkVersion,
30076        __input: &[u8],
30077    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30078        let avail_len = __input.len();
30079        let mut payload_buf = [0; Self::ENCODED_LEN];
30080        let mut buf = if avail_len < Self::ENCODED_LEN {
30081            payload_buf[0..avail_len].copy_from_slice(__input);
30082            Bytes::new(&payload_buf)
30083        } else {
30084            Bytes::new(__input)
30085        };
30086        let mut __struct = Self::default();
30087        __struct.message_type = buf.get_u16_le();
30088        __struct.target_network = buf.get_u8();
30089        __struct.target_system = buf.get_u8();
30090        __struct.target_component = buf.get_u8();
30091        for v in &mut __struct.payload {
30092            let val = buf.get_u8();
30093            *v = val;
30094        }
30095        Ok(__struct)
30096    }
30097    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30098        let mut __tmp = BytesMut::new(bytes);
30099        #[allow(clippy::absurd_extreme_comparisons)]
30100        #[allow(unused_comparisons)]
30101        if __tmp.remaining() < Self::ENCODED_LEN {
30102            panic!(
30103                "buffer is too small (need {} bytes, but got {})",
30104                Self::ENCODED_LEN,
30105                __tmp.remaining(),
30106            )
30107        }
30108        __tmp.put_u16_le(self.message_type);
30109        __tmp.put_u8(self.target_network);
30110        __tmp.put_u8(self.target_system);
30111        __tmp.put_u8(self.target_component);
30112        for val in &self.payload {
30113            __tmp.put_u8(*val);
30114        }
30115        if matches!(version, MavlinkVersion::V2) {
30116            let len = __tmp.len();
30117            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30118        } else {
30119            __tmp.len()
30120        }
30121    }
30122}
30123#[doc = "id: 74"]
30124#[doc = "Metrics typically displayed on a HUD for fixed wing aircraft."]
30125#[derive(Debug, Clone, PartialEq)]
30126#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30127#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30128pub struct VFR_HUD_DATA {
30129    #[doc = "Vehicle speed in form appropriate for vehicle type. For standard aircraft this is typically calibrated airspeed (CAS) or indicated airspeed (IAS) - either of which can be used by a pilot to estimate stall speed."]
30130    pub airspeed: f32,
30131    #[doc = "Current ground speed."]
30132    pub groundspeed: f32,
30133    #[doc = "Current altitude (MSL)."]
30134    pub alt: f32,
30135    #[doc = "Current climb rate."]
30136    pub climb: f32,
30137    #[doc = "Current heading in compass units (0-360, 0=north)."]
30138    pub heading: i16,
30139    #[doc = "Current throttle setting (0 to 100)."]
30140    pub throttle: u16,
30141}
30142impl VFR_HUD_DATA {
30143    pub const ENCODED_LEN: usize = 20usize;
30144    pub const DEFAULT: Self = Self {
30145        airspeed: 0.0_f32,
30146        groundspeed: 0.0_f32,
30147        alt: 0.0_f32,
30148        climb: 0.0_f32,
30149        heading: 0_i16,
30150        throttle: 0_u16,
30151    };
30152    #[cfg(feature = "arbitrary")]
30153    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30154        use arbitrary::{Arbitrary, Unstructured};
30155        let mut buf = [0u8; 1024];
30156        rng.fill_bytes(&mut buf);
30157        let mut unstructured = Unstructured::new(&buf);
30158        Self::arbitrary(&mut unstructured).unwrap_or_default()
30159    }
30160}
30161impl Default for VFR_HUD_DATA {
30162    fn default() -> Self {
30163        Self::DEFAULT.clone()
30164    }
30165}
30166impl MessageData for VFR_HUD_DATA {
30167    type Message = MavMessage;
30168    const ID: u32 = 74u32;
30169    const NAME: &'static str = "VFR_HUD";
30170    const EXTRA_CRC: u8 = 20u8;
30171    const ENCODED_LEN: usize = 20usize;
30172    fn deser(
30173        _version: MavlinkVersion,
30174        __input: &[u8],
30175    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30176        let avail_len = __input.len();
30177        let mut payload_buf = [0; Self::ENCODED_LEN];
30178        let mut buf = if avail_len < Self::ENCODED_LEN {
30179            payload_buf[0..avail_len].copy_from_slice(__input);
30180            Bytes::new(&payload_buf)
30181        } else {
30182            Bytes::new(__input)
30183        };
30184        let mut __struct = Self::default();
30185        __struct.airspeed = buf.get_f32_le();
30186        __struct.groundspeed = buf.get_f32_le();
30187        __struct.alt = buf.get_f32_le();
30188        __struct.climb = buf.get_f32_le();
30189        __struct.heading = buf.get_i16_le();
30190        __struct.throttle = buf.get_u16_le();
30191        Ok(__struct)
30192    }
30193    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30194        let mut __tmp = BytesMut::new(bytes);
30195        #[allow(clippy::absurd_extreme_comparisons)]
30196        #[allow(unused_comparisons)]
30197        if __tmp.remaining() < Self::ENCODED_LEN {
30198            panic!(
30199                "buffer is too small (need {} bytes, but got {})",
30200                Self::ENCODED_LEN,
30201                __tmp.remaining(),
30202            )
30203        }
30204        __tmp.put_f32_le(self.airspeed);
30205        __tmp.put_f32_le(self.groundspeed);
30206        __tmp.put_f32_le(self.alt);
30207        __tmp.put_f32_le(self.climb);
30208        __tmp.put_i16_le(self.heading);
30209        __tmp.put_u16_le(self.throttle);
30210        if matches!(version, MavlinkVersion::V2) {
30211            let len = __tmp.len();
30212            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30213        } else {
30214            __tmp.len()
30215        }
30216    }
30217}
30218#[doc = "id: 241"]
30219#[doc = "Vibration levels and accelerometer clipping."]
30220#[derive(Debug, Clone, PartialEq)]
30221#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30222#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30223pub struct VIBRATION_DATA {
30224    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
30225    pub time_usec: u64,
30226    #[doc = "Vibration levels on X-axis"]
30227    pub vibration_x: f32,
30228    #[doc = "Vibration levels on Y-axis"]
30229    pub vibration_y: f32,
30230    #[doc = "Vibration levels on Z-axis"]
30231    pub vibration_z: f32,
30232    #[doc = "first accelerometer clipping count"]
30233    pub clipping_0: u32,
30234    #[doc = "second accelerometer clipping count"]
30235    pub clipping_1: u32,
30236    #[doc = "third accelerometer clipping count"]
30237    pub clipping_2: u32,
30238}
30239impl VIBRATION_DATA {
30240    pub const ENCODED_LEN: usize = 32usize;
30241    pub const DEFAULT: Self = Self {
30242        time_usec: 0_u64,
30243        vibration_x: 0.0_f32,
30244        vibration_y: 0.0_f32,
30245        vibration_z: 0.0_f32,
30246        clipping_0: 0_u32,
30247        clipping_1: 0_u32,
30248        clipping_2: 0_u32,
30249    };
30250    #[cfg(feature = "arbitrary")]
30251    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30252        use arbitrary::{Arbitrary, Unstructured};
30253        let mut buf = [0u8; 1024];
30254        rng.fill_bytes(&mut buf);
30255        let mut unstructured = Unstructured::new(&buf);
30256        Self::arbitrary(&mut unstructured).unwrap_or_default()
30257    }
30258}
30259impl Default for VIBRATION_DATA {
30260    fn default() -> Self {
30261        Self::DEFAULT.clone()
30262    }
30263}
30264impl MessageData for VIBRATION_DATA {
30265    type Message = MavMessage;
30266    const ID: u32 = 241u32;
30267    const NAME: &'static str = "VIBRATION";
30268    const EXTRA_CRC: u8 = 90u8;
30269    const ENCODED_LEN: usize = 32usize;
30270    fn deser(
30271        _version: MavlinkVersion,
30272        __input: &[u8],
30273    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30274        let avail_len = __input.len();
30275        let mut payload_buf = [0; Self::ENCODED_LEN];
30276        let mut buf = if avail_len < Self::ENCODED_LEN {
30277            payload_buf[0..avail_len].copy_from_slice(__input);
30278            Bytes::new(&payload_buf)
30279        } else {
30280            Bytes::new(__input)
30281        };
30282        let mut __struct = Self::default();
30283        __struct.time_usec = buf.get_u64_le();
30284        __struct.vibration_x = buf.get_f32_le();
30285        __struct.vibration_y = buf.get_f32_le();
30286        __struct.vibration_z = buf.get_f32_le();
30287        __struct.clipping_0 = buf.get_u32_le();
30288        __struct.clipping_1 = buf.get_u32_le();
30289        __struct.clipping_2 = buf.get_u32_le();
30290        Ok(__struct)
30291    }
30292    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30293        let mut __tmp = BytesMut::new(bytes);
30294        #[allow(clippy::absurd_extreme_comparisons)]
30295        #[allow(unused_comparisons)]
30296        if __tmp.remaining() < Self::ENCODED_LEN {
30297            panic!(
30298                "buffer is too small (need {} bytes, but got {})",
30299                Self::ENCODED_LEN,
30300                __tmp.remaining(),
30301            )
30302        }
30303        __tmp.put_u64_le(self.time_usec);
30304        __tmp.put_f32_le(self.vibration_x);
30305        __tmp.put_f32_le(self.vibration_y);
30306        __tmp.put_f32_le(self.vibration_z);
30307        __tmp.put_u32_le(self.clipping_0);
30308        __tmp.put_u32_le(self.clipping_1);
30309        __tmp.put_u32_le(self.clipping_2);
30310        if matches!(version, MavlinkVersion::V2) {
30311            let len = __tmp.len();
30312            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30313        } else {
30314            __tmp.len()
30315        }
30316    }
30317}
30318#[doc = "id: 104"]
30319#[doc = "Global position estimate from a Vicon motion system source."]
30320#[derive(Debug, Clone, PartialEq)]
30321#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30322#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30323pub struct VICON_POSITION_ESTIMATE_DATA {
30324    #[doc = "Timestamp (UNIX time or time since system boot)"]
30325    pub usec: u64,
30326    #[doc = "Global X position"]
30327    pub x: f32,
30328    #[doc = "Global Y position"]
30329    pub y: f32,
30330    #[doc = "Global Z position"]
30331    pub z: f32,
30332    #[doc = "Roll angle"]
30333    pub roll: f32,
30334    #[doc = "Pitch angle"]
30335    pub pitch: f32,
30336    #[doc = "Yaw angle"]
30337    pub yaw: f32,
30338    #[doc = "Row-major representation of 6x6 pose cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30339    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30340    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30341    pub covariance: [f32; 21],
30342}
30343impl VICON_POSITION_ESTIMATE_DATA {
30344    pub const ENCODED_LEN: usize = 116usize;
30345    pub const DEFAULT: Self = Self {
30346        usec: 0_u64,
30347        x: 0.0_f32,
30348        y: 0.0_f32,
30349        z: 0.0_f32,
30350        roll: 0.0_f32,
30351        pitch: 0.0_f32,
30352        yaw: 0.0_f32,
30353        covariance: [0.0_f32; 21usize],
30354    };
30355    #[cfg(feature = "arbitrary")]
30356    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30357        use arbitrary::{Arbitrary, Unstructured};
30358        let mut buf = [0u8; 1024];
30359        rng.fill_bytes(&mut buf);
30360        let mut unstructured = Unstructured::new(&buf);
30361        Self::arbitrary(&mut unstructured).unwrap_or_default()
30362    }
30363}
30364impl Default for VICON_POSITION_ESTIMATE_DATA {
30365    fn default() -> Self {
30366        Self::DEFAULT.clone()
30367    }
30368}
30369impl MessageData for VICON_POSITION_ESTIMATE_DATA {
30370    type Message = MavMessage;
30371    const ID: u32 = 104u32;
30372    const NAME: &'static str = "VICON_POSITION_ESTIMATE";
30373    const EXTRA_CRC: u8 = 56u8;
30374    const ENCODED_LEN: usize = 116usize;
30375    fn deser(
30376        _version: MavlinkVersion,
30377        __input: &[u8],
30378    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30379        let avail_len = __input.len();
30380        let mut payload_buf = [0; Self::ENCODED_LEN];
30381        let mut buf = if avail_len < Self::ENCODED_LEN {
30382            payload_buf[0..avail_len].copy_from_slice(__input);
30383            Bytes::new(&payload_buf)
30384        } else {
30385            Bytes::new(__input)
30386        };
30387        let mut __struct = Self::default();
30388        __struct.usec = buf.get_u64_le();
30389        __struct.x = buf.get_f32_le();
30390        __struct.y = buf.get_f32_le();
30391        __struct.z = buf.get_f32_le();
30392        __struct.roll = buf.get_f32_le();
30393        __struct.pitch = buf.get_f32_le();
30394        __struct.yaw = buf.get_f32_le();
30395        for v in &mut __struct.covariance {
30396            let val = buf.get_f32_le();
30397            *v = val;
30398        }
30399        Ok(__struct)
30400    }
30401    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30402        let mut __tmp = BytesMut::new(bytes);
30403        #[allow(clippy::absurd_extreme_comparisons)]
30404        #[allow(unused_comparisons)]
30405        if __tmp.remaining() < Self::ENCODED_LEN {
30406            panic!(
30407                "buffer is too small (need {} bytes, but got {})",
30408                Self::ENCODED_LEN,
30409                __tmp.remaining(),
30410            )
30411        }
30412        __tmp.put_u64_le(self.usec);
30413        __tmp.put_f32_le(self.x);
30414        __tmp.put_f32_le(self.y);
30415        __tmp.put_f32_le(self.z);
30416        __tmp.put_f32_le(self.roll);
30417        __tmp.put_f32_le(self.pitch);
30418        __tmp.put_f32_le(self.yaw);
30419        for val in &self.covariance {
30420            __tmp.put_f32_le(*val);
30421        }
30422        if matches!(version, MavlinkVersion::V2) {
30423            let len = __tmp.len();
30424            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30425        } else {
30426            __tmp.len()
30427        }
30428    }
30429}
30430#[doc = "id: 269"]
30431#[doc = "Information about video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE, where param2 indicates the video stream id: 0 for all streams, 1 for first, 2 for second, etc."]
30432#[derive(Debug, Clone, PartialEq)]
30433#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30434#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30435pub struct VIDEO_STREAM_INFORMATION_DATA {
30436    #[doc = "Frame rate."]
30437    pub framerate: f32,
30438    #[doc = "Bit rate."]
30439    pub bitrate: u32,
30440    #[doc = "Bitmap of stream status flags."]
30441    pub flags: VideoStreamStatusFlags,
30442    #[doc = "Horizontal resolution."]
30443    pub resolution_h: u16,
30444    #[doc = "Vertical resolution."]
30445    pub resolution_v: u16,
30446    #[doc = "Video image rotation clockwise."]
30447    pub rotation: u16,
30448    #[doc = "Horizontal Field of view."]
30449    pub hfov: u16,
30450    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30451    pub stream_id: u8,
30452    #[doc = "Number of streams available."]
30453    pub count: u8,
30454    #[doc = "Type of stream."]
30455    pub mavtype: VideoStreamType,
30456    #[doc = "Stream name."]
30457    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30458    pub name: [u8; 32],
30459    #[doc = "Video stream URI (TCP or RTSP URI ground station should connect to) or port number (UDP port ground station should listen to)."]
30460    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30461    pub uri: [u8; 160],
30462    #[doc = "Encoding of stream."]
30463    #[cfg_attr(feature = "serde", serde(default))]
30464    pub encoding: VideoStreamEncoding,
30465    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30466    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30467    pub camera_device_id: u8,
30468}
30469impl VIDEO_STREAM_INFORMATION_DATA {
30470    pub const ENCODED_LEN: usize = 215usize;
30471    pub const DEFAULT: Self = Self {
30472        framerate: 0.0_f32,
30473        bitrate: 0_u32,
30474        flags: VideoStreamStatusFlags::DEFAULT,
30475        resolution_h: 0_u16,
30476        resolution_v: 0_u16,
30477        rotation: 0_u16,
30478        hfov: 0_u16,
30479        stream_id: 0_u8,
30480        count: 0_u8,
30481        mavtype: VideoStreamType::DEFAULT,
30482        name: [0_u8; 32usize],
30483        uri: [0_u8; 160usize],
30484        encoding: VideoStreamEncoding::DEFAULT,
30485        camera_device_id: 0_u8,
30486    };
30487    #[cfg(feature = "arbitrary")]
30488    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30489        use arbitrary::{Arbitrary, Unstructured};
30490        let mut buf = [0u8; 1024];
30491        rng.fill_bytes(&mut buf);
30492        let mut unstructured = Unstructured::new(&buf);
30493        Self::arbitrary(&mut unstructured).unwrap_or_default()
30494    }
30495}
30496impl Default for VIDEO_STREAM_INFORMATION_DATA {
30497    fn default() -> Self {
30498        Self::DEFAULT.clone()
30499    }
30500}
30501impl MessageData for VIDEO_STREAM_INFORMATION_DATA {
30502    type Message = MavMessage;
30503    const ID: u32 = 269u32;
30504    const NAME: &'static str = "VIDEO_STREAM_INFORMATION";
30505    const EXTRA_CRC: u8 = 109u8;
30506    const ENCODED_LEN: usize = 215usize;
30507    fn deser(
30508        _version: MavlinkVersion,
30509        __input: &[u8],
30510    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30511        let avail_len = __input.len();
30512        let mut payload_buf = [0; Self::ENCODED_LEN];
30513        let mut buf = if avail_len < Self::ENCODED_LEN {
30514            payload_buf[0..avail_len].copy_from_slice(__input);
30515            Bytes::new(&payload_buf)
30516        } else {
30517            Bytes::new(__input)
30518        };
30519        let mut __struct = Self::default();
30520        __struct.framerate = buf.get_f32_le();
30521        __struct.bitrate = buf.get_u32_le();
30522        let tmp = buf.get_u16_le();
30523        __struct.flags = VideoStreamStatusFlags::from_bits(
30524            tmp & VideoStreamStatusFlags::all().bits(),
30525        )
30526        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30527            flag_type: "VideoStreamStatusFlags",
30528            value: tmp as u32,
30529        })?;
30530        __struct.resolution_h = buf.get_u16_le();
30531        __struct.resolution_v = buf.get_u16_le();
30532        __struct.rotation = buf.get_u16_le();
30533        __struct.hfov = buf.get_u16_le();
30534        __struct.stream_id = buf.get_u8();
30535        __struct.count = buf.get_u8();
30536        let tmp = buf.get_u8();
30537        __struct.mavtype =
30538            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30539                enum_type: "VideoStreamType",
30540                value: tmp as u32,
30541            })?;
30542        for v in &mut __struct.name {
30543            let val = buf.get_u8();
30544            *v = val;
30545        }
30546        for v in &mut __struct.uri {
30547            let val = buf.get_u8();
30548            *v = val;
30549        }
30550        let tmp = buf.get_u8();
30551        __struct.encoding =
30552            FromPrimitive::from_u8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
30553                enum_type: "VideoStreamEncoding",
30554                value: tmp as u32,
30555            })?;
30556        __struct.camera_device_id = buf.get_u8();
30557        Ok(__struct)
30558    }
30559    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30560        let mut __tmp = BytesMut::new(bytes);
30561        #[allow(clippy::absurd_extreme_comparisons)]
30562        #[allow(unused_comparisons)]
30563        if __tmp.remaining() < Self::ENCODED_LEN {
30564            panic!(
30565                "buffer is too small (need {} bytes, but got {})",
30566                Self::ENCODED_LEN,
30567                __tmp.remaining(),
30568            )
30569        }
30570        __tmp.put_f32_le(self.framerate);
30571        __tmp.put_u32_le(self.bitrate);
30572        __tmp.put_u16_le(self.flags.bits());
30573        __tmp.put_u16_le(self.resolution_h);
30574        __tmp.put_u16_le(self.resolution_v);
30575        __tmp.put_u16_le(self.rotation);
30576        __tmp.put_u16_le(self.hfov);
30577        __tmp.put_u8(self.stream_id);
30578        __tmp.put_u8(self.count);
30579        __tmp.put_u8(self.mavtype as u8);
30580        for val in &self.name {
30581            __tmp.put_u8(*val);
30582        }
30583        for val in &self.uri {
30584            __tmp.put_u8(*val);
30585        }
30586        __tmp.put_u8(self.encoding as u8);
30587        __tmp.put_u8(self.camera_device_id);
30588        if matches!(version, MavlinkVersion::V2) {
30589            let len = __tmp.len();
30590            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30591        } else {
30592            __tmp.len()
30593        }
30594    }
30595}
30596#[doc = "id: 270"]
30597#[doc = "Information about the status of a video stream. It may be requested using MAV_CMD_REQUEST_MESSAGE."]
30598#[derive(Debug, Clone, PartialEq)]
30599#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30600#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30601pub struct VIDEO_STREAM_STATUS_DATA {
30602    #[doc = "Frame rate"]
30603    pub framerate: f32,
30604    #[doc = "Bit rate"]
30605    pub bitrate: u32,
30606    #[doc = "Bitmap of stream status flags"]
30607    pub flags: VideoStreamStatusFlags,
30608    #[doc = "Horizontal resolution"]
30609    pub resolution_h: u16,
30610    #[doc = "Vertical resolution"]
30611    pub resolution_v: u16,
30612    #[doc = "Video image rotation clockwise"]
30613    pub rotation: u16,
30614    #[doc = "Horizontal Field of view"]
30615    pub hfov: u16,
30616    #[doc = "Video Stream ID (1 for first, 2 for second, etc.)"]
30617    pub stream_id: u8,
30618    #[doc = "Camera id of a non-MAVLink camera attached to an autopilot (1-6).  0 if the component is a MAVLink camera (with its own component id)."]
30619    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30620    pub camera_device_id: u8,
30621}
30622impl VIDEO_STREAM_STATUS_DATA {
30623    pub const ENCODED_LEN: usize = 20usize;
30624    pub const DEFAULT: Self = Self {
30625        framerate: 0.0_f32,
30626        bitrate: 0_u32,
30627        flags: VideoStreamStatusFlags::DEFAULT,
30628        resolution_h: 0_u16,
30629        resolution_v: 0_u16,
30630        rotation: 0_u16,
30631        hfov: 0_u16,
30632        stream_id: 0_u8,
30633        camera_device_id: 0_u8,
30634    };
30635    #[cfg(feature = "arbitrary")]
30636    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30637        use arbitrary::{Arbitrary, Unstructured};
30638        let mut buf = [0u8; 1024];
30639        rng.fill_bytes(&mut buf);
30640        let mut unstructured = Unstructured::new(&buf);
30641        Self::arbitrary(&mut unstructured).unwrap_or_default()
30642    }
30643}
30644impl Default for VIDEO_STREAM_STATUS_DATA {
30645    fn default() -> Self {
30646        Self::DEFAULT.clone()
30647    }
30648}
30649impl MessageData for VIDEO_STREAM_STATUS_DATA {
30650    type Message = MavMessage;
30651    const ID: u32 = 270u32;
30652    const NAME: &'static str = "VIDEO_STREAM_STATUS";
30653    const EXTRA_CRC: u8 = 59u8;
30654    const ENCODED_LEN: usize = 20usize;
30655    fn deser(
30656        _version: MavlinkVersion,
30657        __input: &[u8],
30658    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30659        let avail_len = __input.len();
30660        let mut payload_buf = [0; Self::ENCODED_LEN];
30661        let mut buf = if avail_len < Self::ENCODED_LEN {
30662            payload_buf[0..avail_len].copy_from_slice(__input);
30663            Bytes::new(&payload_buf)
30664        } else {
30665            Bytes::new(__input)
30666        };
30667        let mut __struct = Self::default();
30668        __struct.framerate = buf.get_f32_le();
30669        __struct.bitrate = buf.get_u32_le();
30670        let tmp = buf.get_u16_le();
30671        __struct.flags = VideoStreamStatusFlags::from_bits(
30672            tmp & VideoStreamStatusFlags::all().bits(),
30673        )
30674        .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
30675            flag_type: "VideoStreamStatusFlags",
30676            value: tmp as u32,
30677        })?;
30678        __struct.resolution_h = buf.get_u16_le();
30679        __struct.resolution_v = buf.get_u16_le();
30680        __struct.rotation = buf.get_u16_le();
30681        __struct.hfov = buf.get_u16_le();
30682        __struct.stream_id = buf.get_u8();
30683        __struct.camera_device_id = buf.get_u8();
30684        Ok(__struct)
30685    }
30686    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30687        let mut __tmp = BytesMut::new(bytes);
30688        #[allow(clippy::absurd_extreme_comparisons)]
30689        #[allow(unused_comparisons)]
30690        if __tmp.remaining() < Self::ENCODED_LEN {
30691            panic!(
30692                "buffer is too small (need {} bytes, but got {})",
30693                Self::ENCODED_LEN,
30694                __tmp.remaining(),
30695            )
30696        }
30697        __tmp.put_f32_le(self.framerate);
30698        __tmp.put_u32_le(self.bitrate);
30699        __tmp.put_u16_le(self.flags.bits());
30700        __tmp.put_u16_le(self.resolution_h);
30701        __tmp.put_u16_le(self.resolution_v);
30702        __tmp.put_u16_le(self.rotation);
30703        __tmp.put_u16_le(self.hfov);
30704        __tmp.put_u8(self.stream_id);
30705        __tmp.put_u8(self.camera_device_id);
30706        if matches!(version, MavlinkVersion::V2) {
30707            let len = __tmp.len();
30708            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30709        } else {
30710            __tmp.len()
30711        }
30712    }
30713}
30714#[doc = "id: 102"]
30715#[doc = "Local position/attitude estimate from a vision source."]
30716#[derive(Debug, Clone, PartialEq)]
30717#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30718#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30719pub struct VISION_POSITION_ESTIMATE_DATA {
30720    #[doc = "Timestamp (UNIX time or time since system boot)"]
30721    pub usec: u64,
30722    #[doc = "Local X position"]
30723    pub x: f32,
30724    #[doc = "Local Y position"]
30725    pub y: f32,
30726    #[doc = "Local Z position"]
30727    pub z: f32,
30728    #[doc = "Roll angle"]
30729    pub roll: f32,
30730    #[doc = "Pitch angle"]
30731    pub pitch: f32,
30732    #[doc = "Yaw angle"]
30733    pub yaw: f32,
30734    #[doc = "Row-major representation of pose 6x6 cross-covariance matrix upper right triangle (states: x, y, z, roll, pitch, yaw; first six entries are the first ROW, next five entries are the second ROW, etc.). If unknown, assign NaN value to first element in the array."]
30735    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30736    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30737    pub covariance: [f32; 21],
30738    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30739    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30740    pub reset_counter: u8,
30741}
30742impl VISION_POSITION_ESTIMATE_DATA {
30743    pub const ENCODED_LEN: usize = 117usize;
30744    pub const DEFAULT: Self = Self {
30745        usec: 0_u64,
30746        x: 0.0_f32,
30747        y: 0.0_f32,
30748        z: 0.0_f32,
30749        roll: 0.0_f32,
30750        pitch: 0.0_f32,
30751        yaw: 0.0_f32,
30752        covariance: [0.0_f32; 21usize],
30753        reset_counter: 0_u8,
30754    };
30755    #[cfg(feature = "arbitrary")]
30756    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30757        use arbitrary::{Arbitrary, Unstructured};
30758        let mut buf = [0u8; 1024];
30759        rng.fill_bytes(&mut buf);
30760        let mut unstructured = Unstructured::new(&buf);
30761        Self::arbitrary(&mut unstructured).unwrap_or_default()
30762    }
30763}
30764impl Default for VISION_POSITION_ESTIMATE_DATA {
30765    fn default() -> Self {
30766        Self::DEFAULT.clone()
30767    }
30768}
30769impl MessageData for VISION_POSITION_ESTIMATE_DATA {
30770    type Message = MavMessage;
30771    const ID: u32 = 102u32;
30772    const NAME: &'static str = "VISION_POSITION_ESTIMATE";
30773    const EXTRA_CRC: u8 = 158u8;
30774    const ENCODED_LEN: usize = 117usize;
30775    fn deser(
30776        _version: MavlinkVersion,
30777        __input: &[u8],
30778    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30779        let avail_len = __input.len();
30780        let mut payload_buf = [0; Self::ENCODED_LEN];
30781        let mut buf = if avail_len < Self::ENCODED_LEN {
30782            payload_buf[0..avail_len].copy_from_slice(__input);
30783            Bytes::new(&payload_buf)
30784        } else {
30785            Bytes::new(__input)
30786        };
30787        let mut __struct = Self::default();
30788        __struct.usec = buf.get_u64_le();
30789        __struct.x = buf.get_f32_le();
30790        __struct.y = buf.get_f32_le();
30791        __struct.z = buf.get_f32_le();
30792        __struct.roll = buf.get_f32_le();
30793        __struct.pitch = buf.get_f32_le();
30794        __struct.yaw = buf.get_f32_le();
30795        for v in &mut __struct.covariance {
30796            let val = buf.get_f32_le();
30797            *v = val;
30798        }
30799        __struct.reset_counter = buf.get_u8();
30800        Ok(__struct)
30801    }
30802    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30803        let mut __tmp = BytesMut::new(bytes);
30804        #[allow(clippy::absurd_extreme_comparisons)]
30805        #[allow(unused_comparisons)]
30806        if __tmp.remaining() < Self::ENCODED_LEN {
30807            panic!(
30808                "buffer is too small (need {} bytes, but got {})",
30809                Self::ENCODED_LEN,
30810                __tmp.remaining(),
30811            )
30812        }
30813        __tmp.put_u64_le(self.usec);
30814        __tmp.put_f32_le(self.x);
30815        __tmp.put_f32_le(self.y);
30816        __tmp.put_f32_le(self.z);
30817        __tmp.put_f32_le(self.roll);
30818        __tmp.put_f32_le(self.pitch);
30819        __tmp.put_f32_le(self.yaw);
30820        for val in &self.covariance {
30821            __tmp.put_f32_le(*val);
30822        }
30823        __tmp.put_u8(self.reset_counter);
30824        if matches!(version, MavlinkVersion::V2) {
30825            let len = __tmp.len();
30826            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30827        } else {
30828            __tmp.len()
30829        }
30830    }
30831}
30832#[doc = "id: 103"]
30833#[doc = "Speed estimate from a vision source."]
30834#[derive(Debug, Clone, PartialEq)]
30835#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30836#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30837pub struct VISION_SPEED_ESTIMATE_DATA {
30838    #[doc = "Timestamp (UNIX time or time since system boot)"]
30839    pub usec: u64,
30840    #[doc = "Global X speed"]
30841    pub x: f32,
30842    #[doc = "Global Y speed"]
30843    pub y: f32,
30844    #[doc = "Global Z speed"]
30845    pub z: f32,
30846    #[doc = "Row-major representation of 3x3 linear velocity covariance matrix (states: vx, vy, vz; 1st three entries - 1st row, etc.). If unknown, assign NaN value to first element in the array."]
30847    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30848    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30849    pub covariance: [f32; 9],
30850    #[doc = "Estimate reset counter. This should be incremented when the estimate resets in any of the dimensions (position, velocity, attitude, angular speed). This is designed to be used when e.g an external SLAM system detects a loop-closure and the estimate jumps."]
30851    #[cfg_attr(feature = "serde", serde(default = "crate::RustDefault::rust_default"))]
30852    pub reset_counter: u8,
30853}
30854impl VISION_SPEED_ESTIMATE_DATA {
30855    pub const ENCODED_LEN: usize = 57usize;
30856    pub const DEFAULT: Self = Self {
30857        usec: 0_u64,
30858        x: 0.0_f32,
30859        y: 0.0_f32,
30860        z: 0.0_f32,
30861        covariance: [0.0_f32; 9usize],
30862        reset_counter: 0_u8,
30863    };
30864    #[cfg(feature = "arbitrary")]
30865    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30866        use arbitrary::{Arbitrary, Unstructured};
30867        let mut buf = [0u8; 1024];
30868        rng.fill_bytes(&mut buf);
30869        let mut unstructured = Unstructured::new(&buf);
30870        Self::arbitrary(&mut unstructured).unwrap_or_default()
30871    }
30872}
30873impl Default for VISION_SPEED_ESTIMATE_DATA {
30874    fn default() -> Self {
30875        Self::DEFAULT.clone()
30876    }
30877}
30878impl MessageData for VISION_SPEED_ESTIMATE_DATA {
30879    type Message = MavMessage;
30880    const ID: u32 = 103u32;
30881    const NAME: &'static str = "VISION_SPEED_ESTIMATE";
30882    const EXTRA_CRC: u8 = 208u8;
30883    const ENCODED_LEN: usize = 57usize;
30884    fn deser(
30885        _version: MavlinkVersion,
30886        __input: &[u8],
30887    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30888        let avail_len = __input.len();
30889        let mut payload_buf = [0; Self::ENCODED_LEN];
30890        let mut buf = if avail_len < Self::ENCODED_LEN {
30891            payload_buf[0..avail_len].copy_from_slice(__input);
30892            Bytes::new(&payload_buf)
30893        } else {
30894            Bytes::new(__input)
30895        };
30896        let mut __struct = Self::default();
30897        __struct.usec = buf.get_u64_le();
30898        __struct.x = buf.get_f32_le();
30899        __struct.y = buf.get_f32_le();
30900        __struct.z = buf.get_f32_le();
30901        for v in &mut __struct.covariance {
30902            let val = buf.get_f32_le();
30903            *v = val;
30904        }
30905        __struct.reset_counter = buf.get_u8();
30906        Ok(__struct)
30907    }
30908    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30909        let mut __tmp = BytesMut::new(bytes);
30910        #[allow(clippy::absurd_extreme_comparisons)]
30911        #[allow(unused_comparisons)]
30912        if __tmp.remaining() < Self::ENCODED_LEN {
30913            panic!(
30914                "buffer is too small (need {} bytes, but got {})",
30915                Self::ENCODED_LEN,
30916                __tmp.remaining(),
30917            )
30918        }
30919        __tmp.put_u64_le(self.usec);
30920        __tmp.put_f32_le(self.x);
30921        __tmp.put_f32_le(self.y);
30922        __tmp.put_f32_le(self.z);
30923        for val in &self.covariance {
30924            __tmp.put_f32_le(*val);
30925        }
30926        __tmp.put_u8(self.reset_counter);
30927        if matches!(version, MavlinkVersion::V2) {
30928            let len = __tmp.len();
30929            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
30930        } else {
30931            __tmp.len()
30932        }
30933    }
30934}
30935#[doc = "id: 9000"]
30936#[doc = "Cumulative distance traveled for each reported wheel."]
30937#[derive(Debug, Clone, PartialEq)]
30938#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
30939#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
30940pub struct WHEEL_DISTANCE_DATA {
30941    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
30942    pub time_usec: u64,
30943    #[doc = "Distance reported by individual wheel encoders. Forward rotations increase values, reverse rotations decrease them. Not all wheels will necessarily have wheel encoders; the mapping of encoders to wheel positions must be agreed/understood by the endpoints."]
30944    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
30945    pub distance: [f64; 16],
30946    #[doc = "Number of wheels reported."]
30947    pub count: u8,
30948}
30949impl WHEEL_DISTANCE_DATA {
30950    pub const ENCODED_LEN: usize = 137usize;
30951    pub const DEFAULT: Self = Self {
30952        time_usec: 0_u64,
30953        distance: [0.0_f64; 16usize],
30954        count: 0_u8,
30955    };
30956    #[cfg(feature = "arbitrary")]
30957    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
30958        use arbitrary::{Arbitrary, Unstructured};
30959        let mut buf = [0u8; 1024];
30960        rng.fill_bytes(&mut buf);
30961        let mut unstructured = Unstructured::new(&buf);
30962        Self::arbitrary(&mut unstructured).unwrap_or_default()
30963    }
30964}
30965impl Default for WHEEL_DISTANCE_DATA {
30966    fn default() -> Self {
30967        Self::DEFAULT.clone()
30968    }
30969}
30970impl MessageData for WHEEL_DISTANCE_DATA {
30971    type Message = MavMessage;
30972    const ID: u32 = 9000u32;
30973    const NAME: &'static str = "WHEEL_DISTANCE";
30974    const EXTRA_CRC: u8 = 113u8;
30975    const ENCODED_LEN: usize = 137usize;
30976    fn deser(
30977        _version: MavlinkVersion,
30978        __input: &[u8],
30979    ) -> Result<Self, ::mavlink_core::error::ParserError> {
30980        let avail_len = __input.len();
30981        let mut payload_buf = [0; Self::ENCODED_LEN];
30982        let mut buf = if avail_len < Self::ENCODED_LEN {
30983            payload_buf[0..avail_len].copy_from_slice(__input);
30984            Bytes::new(&payload_buf)
30985        } else {
30986            Bytes::new(__input)
30987        };
30988        let mut __struct = Self::default();
30989        __struct.time_usec = buf.get_u64_le();
30990        for v in &mut __struct.distance {
30991            let val = buf.get_f64_le();
30992            *v = val;
30993        }
30994        __struct.count = buf.get_u8();
30995        Ok(__struct)
30996    }
30997    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
30998        let mut __tmp = BytesMut::new(bytes);
30999        #[allow(clippy::absurd_extreme_comparisons)]
31000        #[allow(unused_comparisons)]
31001        if __tmp.remaining() < Self::ENCODED_LEN {
31002            panic!(
31003                "buffer is too small (need {} bytes, but got {})",
31004                Self::ENCODED_LEN,
31005                __tmp.remaining(),
31006            )
31007        }
31008        __tmp.put_u64_le(self.time_usec);
31009        for val in &self.distance {
31010            __tmp.put_f64_le(*val);
31011        }
31012        __tmp.put_u8(self.count);
31013        if matches!(version, MavlinkVersion::V2) {
31014            let len = __tmp.len();
31015            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31016        } else {
31017            __tmp.len()
31018        }
31019    }
31020}
31021#[doc = "id: 299"]
31022#[doc = "Configure WiFi AP SSID, password, and mode. This message is re-emitted as an acknowledgement by the AP. The message may also be explicitly requested using MAV_CMD_REQUEST_MESSAGE."]
31023#[derive(Debug, Clone, PartialEq)]
31024#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31025#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31026pub struct WIFI_CONFIG_AP_DATA {
31027    #[doc = "Name of Wi-Fi network (SSID). Blank to leave it unchanged when setting. Current SSID when sent back as a response."]
31028    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31029    pub ssid: [u8; 32],
31030    #[doc = "Password. Blank for an open AP. MD5 hash when message is sent back as a response."]
31031    #[cfg_attr(feature = "serde", serde(with = "serde_arrays"))]
31032    pub password: [u8; 64],
31033    #[doc = "WiFi Mode."]
31034    #[cfg_attr(feature = "serde", serde(default))]
31035    pub mode: WifiConfigApMode,
31036    #[doc = "Message acceptance response (sent back to GS)."]
31037    #[cfg_attr(feature = "serde", serde(default))]
31038    pub response: WifiConfigApResponse,
31039}
31040impl WIFI_CONFIG_AP_DATA {
31041    pub const ENCODED_LEN: usize = 98usize;
31042    pub const DEFAULT: Self = Self {
31043        ssid: [0_u8; 32usize],
31044        password: [0_u8; 64usize],
31045        mode: WifiConfigApMode::DEFAULT,
31046        response: WifiConfigApResponse::DEFAULT,
31047    };
31048    #[cfg(feature = "arbitrary")]
31049    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31050        use arbitrary::{Arbitrary, Unstructured};
31051        let mut buf = [0u8; 1024];
31052        rng.fill_bytes(&mut buf);
31053        let mut unstructured = Unstructured::new(&buf);
31054        Self::arbitrary(&mut unstructured).unwrap_or_default()
31055    }
31056}
31057impl Default for WIFI_CONFIG_AP_DATA {
31058    fn default() -> Self {
31059        Self::DEFAULT.clone()
31060    }
31061}
31062impl MessageData for WIFI_CONFIG_AP_DATA {
31063    type Message = MavMessage;
31064    const ID: u32 = 299u32;
31065    const NAME: &'static str = "WIFI_CONFIG_AP";
31066    const EXTRA_CRC: u8 = 19u8;
31067    const ENCODED_LEN: usize = 98usize;
31068    fn deser(
31069        _version: MavlinkVersion,
31070        __input: &[u8],
31071    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31072        let avail_len = __input.len();
31073        let mut payload_buf = [0; Self::ENCODED_LEN];
31074        let mut buf = if avail_len < Self::ENCODED_LEN {
31075            payload_buf[0..avail_len].copy_from_slice(__input);
31076            Bytes::new(&payload_buf)
31077        } else {
31078            Bytes::new(__input)
31079        };
31080        let mut __struct = Self::default();
31081        for v in &mut __struct.ssid {
31082            let val = buf.get_u8();
31083            *v = val;
31084        }
31085        for v in &mut __struct.password {
31086            let val = buf.get_u8();
31087            *v = val;
31088        }
31089        let tmp = buf.get_i8();
31090        __struct.mode =
31091            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31092                enum_type: "WifiConfigApMode",
31093                value: tmp as u32,
31094            })?;
31095        let tmp = buf.get_i8();
31096        __struct.response =
31097            FromPrimitive::from_i8(tmp).ok_or(::mavlink_core::error::ParserError::InvalidEnum {
31098                enum_type: "WifiConfigApResponse",
31099                value: tmp as u32,
31100            })?;
31101        Ok(__struct)
31102    }
31103    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31104        let mut __tmp = BytesMut::new(bytes);
31105        #[allow(clippy::absurd_extreme_comparisons)]
31106        #[allow(unused_comparisons)]
31107        if __tmp.remaining() < Self::ENCODED_LEN {
31108            panic!(
31109                "buffer is too small (need {} bytes, but got {})",
31110                Self::ENCODED_LEN,
31111                __tmp.remaining(),
31112            )
31113        }
31114        for val in &self.ssid {
31115            __tmp.put_u8(*val);
31116        }
31117        for val in &self.password {
31118            __tmp.put_u8(*val);
31119        }
31120        __tmp.put_i8(self.mode as i8);
31121        __tmp.put_i8(self.response as i8);
31122        if matches!(version, MavlinkVersion::V2) {
31123            let len = __tmp.len();
31124            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31125        } else {
31126            __tmp.len()
31127        }
31128    }
31129}
31130#[doc = "id: 9005"]
31131#[doc = "Winch status."]
31132#[derive(Debug, Clone, PartialEq)]
31133#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31134#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31135pub struct WINCH_STATUS_DATA {
31136    #[doc = "Timestamp (synced to UNIX time or since system boot)."]
31137    pub time_usec: u64,
31138    #[doc = "Length of line released. NaN if unknown"]
31139    pub line_length: f32,
31140    #[doc = "Speed line is being released or retracted. Positive values if being released, negative values if being retracted, NaN if unknown"]
31141    pub speed: f32,
31142    #[doc = "Tension on the line. NaN if unknown"]
31143    pub tension: f32,
31144    #[doc = "Voltage of the battery supplying the winch. NaN if unknown"]
31145    pub voltage: f32,
31146    #[doc = "Current draw from the winch. NaN if unknown"]
31147    pub current: f32,
31148    #[doc = "Status flags"]
31149    pub status: MavWinchStatusFlag,
31150    #[doc = "Temperature of the motor. INT16_MAX if unknown"]
31151    pub temperature: i16,
31152}
31153impl WINCH_STATUS_DATA {
31154    pub const ENCODED_LEN: usize = 34usize;
31155    pub const DEFAULT: Self = Self {
31156        time_usec: 0_u64,
31157        line_length: 0.0_f32,
31158        speed: 0.0_f32,
31159        tension: 0.0_f32,
31160        voltage: 0.0_f32,
31161        current: 0.0_f32,
31162        status: MavWinchStatusFlag::DEFAULT,
31163        temperature: 0_i16,
31164    };
31165    #[cfg(feature = "arbitrary")]
31166    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31167        use arbitrary::{Arbitrary, Unstructured};
31168        let mut buf = [0u8; 1024];
31169        rng.fill_bytes(&mut buf);
31170        let mut unstructured = Unstructured::new(&buf);
31171        Self::arbitrary(&mut unstructured).unwrap_or_default()
31172    }
31173}
31174impl Default for WINCH_STATUS_DATA {
31175    fn default() -> Self {
31176        Self::DEFAULT.clone()
31177    }
31178}
31179impl MessageData for WINCH_STATUS_DATA {
31180    type Message = MavMessage;
31181    const ID: u32 = 9005u32;
31182    const NAME: &'static str = "WINCH_STATUS";
31183    const EXTRA_CRC: u8 = 117u8;
31184    const ENCODED_LEN: usize = 34usize;
31185    fn deser(
31186        _version: MavlinkVersion,
31187        __input: &[u8],
31188    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31189        let avail_len = __input.len();
31190        let mut payload_buf = [0; Self::ENCODED_LEN];
31191        let mut buf = if avail_len < Self::ENCODED_LEN {
31192            payload_buf[0..avail_len].copy_from_slice(__input);
31193            Bytes::new(&payload_buf)
31194        } else {
31195            Bytes::new(__input)
31196        };
31197        let mut __struct = Self::default();
31198        __struct.time_usec = buf.get_u64_le();
31199        __struct.line_length = buf.get_f32_le();
31200        __struct.speed = buf.get_f32_le();
31201        __struct.tension = buf.get_f32_le();
31202        __struct.voltage = buf.get_f32_le();
31203        __struct.current = buf.get_f32_le();
31204        let tmp = buf.get_u32_le();
31205        __struct.status = MavWinchStatusFlag::from_bits(tmp & MavWinchStatusFlag::all().bits())
31206            .ok_or(::mavlink_core::error::ParserError::InvalidFlag {
31207                flag_type: "MavWinchStatusFlag",
31208                value: tmp as u32,
31209            })?;
31210        __struct.temperature = buf.get_i16_le();
31211        Ok(__struct)
31212    }
31213    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31214        let mut __tmp = BytesMut::new(bytes);
31215        #[allow(clippy::absurd_extreme_comparisons)]
31216        #[allow(unused_comparisons)]
31217        if __tmp.remaining() < Self::ENCODED_LEN {
31218            panic!(
31219                "buffer is too small (need {} bytes, but got {})",
31220                Self::ENCODED_LEN,
31221                __tmp.remaining(),
31222            )
31223        }
31224        __tmp.put_u64_le(self.time_usec);
31225        __tmp.put_f32_le(self.line_length);
31226        __tmp.put_f32_le(self.speed);
31227        __tmp.put_f32_le(self.tension);
31228        __tmp.put_f32_le(self.voltage);
31229        __tmp.put_f32_le(self.current);
31230        __tmp.put_u32_le(self.status.bits());
31231        __tmp.put_i16_le(self.temperature);
31232        if matches!(version, MavlinkVersion::V2) {
31233            let len = __tmp.len();
31234            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31235        } else {
31236            __tmp.len()
31237        }
31238    }
31239}
31240#[doc = "id: 231"]
31241#[doc = "Wind estimate from vehicle. Note that despite the name, this message does not actually contain any covariances but instead variability and accuracy fields in terms of standard deviation (1-STD)."]
31242#[derive(Debug, Clone, PartialEq)]
31243#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31244#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31245pub struct WIND_COV_DATA {
31246    #[doc = "Timestamp (UNIX Epoch time or time since system boot). The receiving end can infer timestamp format (since 1.1.1970 or since system boot) by checking for the magnitude of the number."]
31247    pub time_usec: u64,
31248    #[doc = "Wind in North (NED) direction (NAN if unknown)"]
31249    pub wind_x: f32,
31250    #[doc = "Wind in East (NED) direction (NAN if unknown)"]
31251    pub wind_y: f32,
31252    #[doc = "Wind in down (NED) direction (NAN if unknown)"]
31253    pub wind_z: f32,
31254    #[doc = "Variability of wind in XY, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31255    pub var_horiz: f32,
31256    #[doc = "Variability of wind in Z, 1-STD estimated from a 1 Hz lowpassed wind estimate (NAN if unknown)"]
31257    pub var_vert: f32,
31258    #[doc = "Altitude (MSL) that this measurement was taken at (NAN if unknown)"]
31259    pub wind_alt: f32,
31260    #[doc = "Horizontal speed 1-STD accuracy (0 if unknown)"]
31261    pub horiz_accuracy: f32,
31262    #[doc = "Vertical speed 1-STD accuracy (0 if unknown)"]
31263    pub vert_accuracy: f32,
31264}
31265impl WIND_COV_DATA {
31266    pub const ENCODED_LEN: usize = 40usize;
31267    pub const DEFAULT: Self = Self {
31268        time_usec: 0_u64,
31269        wind_x: 0.0_f32,
31270        wind_y: 0.0_f32,
31271        wind_z: 0.0_f32,
31272        var_horiz: 0.0_f32,
31273        var_vert: 0.0_f32,
31274        wind_alt: 0.0_f32,
31275        horiz_accuracy: 0.0_f32,
31276        vert_accuracy: 0.0_f32,
31277    };
31278    #[cfg(feature = "arbitrary")]
31279    pub fn random<R: rand::RngCore>(rng: &mut R) -> Self {
31280        use arbitrary::{Arbitrary, Unstructured};
31281        let mut buf = [0u8; 1024];
31282        rng.fill_bytes(&mut buf);
31283        let mut unstructured = Unstructured::new(&buf);
31284        Self::arbitrary(&mut unstructured).unwrap_or_default()
31285    }
31286}
31287impl Default for WIND_COV_DATA {
31288    fn default() -> Self {
31289        Self::DEFAULT.clone()
31290    }
31291}
31292impl MessageData for WIND_COV_DATA {
31293    type Message = MavMessage;
31294    const ID: u32 = 231u32;
31295    const NAME: &'static str = "WIND_COV";
31296    const EXTRA_CRC: u8 = 105u8;
31297    const ENCODED_LEN: usize = 40usize;
31298    fn deser(
31299        _version: MavlinkVersion,
31300        __input: &[u8],
31301    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31302        let avail_len = __input.len();
31303        let mut payload_buf = [0; Self::ENCODED_LEN];
31304        let mut buf = if avail_len < Self::ENCODED_LEN {
31305            payload_buf[0..avail_len].copy_from_slice(__input);
31306            Bytes::new(&payload_buf)
31307        } else {
31308            Bytes::new(__input)
31309        };
31310        let mut __struct = Self::default();
31311        __struct.time_usec = buf.get_u64_le();
31312        __struct.wind_x = buf.get_f32_le();
31313        __struct.wind_y = buf.get_f32_le();
31314        __struct.wind_z = buf.get_f32_le();
31315        __struct.var_horiz = buf.get_f32_le();
31316        __struct.var_vert = buf.get_f32_le();
31317        __struct.wind_alt = buf.get_f32_le();
31318        __struct.horiz_accuracy = buf.get_f32_le();
31319        __struct.vert_accuracy = buf.get_f32_le();
31320        Ok(__struct)
31321    }
31322    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
31323        let mut __tmp = BytesMut::new(bytes);
31324        #[allow(clippy::absurd_extreme_comparisons)]
31325        #[allow(unused_comparisons)]
31326        if __tmp.remaining() < Self::ENCODED_LEN {
31327            panic!(
31328                "buffer is too small (need {} bytes, but got {})",
31329                Self::ENCODED_LEN,
31330                __tmp.remaining(),
31331            )
31332        }
31333        __tmp.put_u64_le(self.time_usec);
31334        __tmp.put_f32_le(self.wind_x);
31335        __tmp.put_f32_le(self.wind_y);
31336        __tmp.put_f32_le(self.wind_z);
31337        __tmp.put_f32_le(self.var_horiz);
31338        __tmp.put_f32_le(self.var_vert);
31339        __tmp.put_f32_le(self.wind_alt);
31340        __tmp.put_f32_le(self.horiz_accuracy);
31341        __tmp.put_f32_le(self.vert_accuracy);
31342        if matches!(version, MavlinkVersion::V2) {
31343            let len = __tmp.len();
31344            ::mavlink_core::utils::remove_trailing_zeroes(&bytes[..len])
31345        } else {
31346            __tmp.len()
31347        }
31348    }
31349}
31350#[derive(Clone, PartialEq, Debug)]
31351#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
31352#[cfg_attr(feature = "serde", serde(tag = "type"))]
31353#[cfg_attr(feature = "arbitrary", derive(Arbitrary))]
31354#[repr(u32)]
31355pub enum MavMessage {
31356    ACTUATOR_CONTROL_TARGET(ACTUATOR_CONTROL_TARGET_DATA),
31357    ACTUATOR_OUTPUT_STATUS(ACTUATOR_OUTPUT_STATUS_DATA),
31358    ADSB_VEHICLE(ADSB_VEHICLE_DATA),
31359    AIS_VESSEL(AIS_VESSEL_DATA),
31360    ALTITUDE(ALTITUDE_DATA),
31361    ATTITUDE(ATTITUDE_DATA),
31362    ATTITUDE_QUATERNION(ATTITUDE_QUATERNION_DATA),
31363    ATTITUDE_QUATERNION_COV(ATTITUDE_QUATERNION_COV_DATA),
31364    ATTITUDE_TARGET(ATTITUDE_TARGET_DATA),
31365    ATT_POS_MOCAP(ATT_POS_MOCAP_DATA),
31366    AUTH_KEY(AUTH_KEY_DATA),
31367    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA),
31368    AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA),
31369    AVAILABLE_MODES(AVAILABLE_MODES_DATA),
31370    AVAILABLE_MODES_MONITOR(AVAILABLE_MODES_MONITOR_DATA),
31371    BATTERY_INFO(BATTERY_INFO_DATA),
31372    BATTERY_STATUS(BATTERY_STATUS_DATA),
31373    BUTTON_CHANGE(BUTTON_CHANGE_DATA),
31374    CAMERA_CAPTURE_STATUS(CAMERA_CAPTURE_STATUS_DATA),
31375    CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA),
31376    CAMERA_IMAGE_CAPTURED(CAMERA_IMAGE_CAPTURED_DATA),
31377    CAMERA_INFORMATION(CAMERA_INFORMATION_DATA),
31378    CAMERA_SETTINGS(CAMERA_SETTINGS_DATA),
31379    CAMERA_THERMAL_RANGE(CAMERA_THERMAL_RANGE_DATA),
31380    CAMERA_TRACKING_GEO_STATUS(CAMERA_TRACKING_GEO_STATUS_DATA),
31381    CAMERA_TRACKING_IMAGE_STATUS(CAMERA_TRACKING_IMAGE_STATUS_DATA),
31382    CAMERA_TRIGGER(CAMERA_TRIGGER_DATA),
31383    CANFD_FRAME(CANFD_FRAME_DATA),
31384    CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA),
31385    CAN_FRAME(CAN_FRAME_DATA),
31386    CELLULAR_CONFIG(CELLULAR_CONFIG_DATA),
31387    CELLULAR_STATUS(CELLULAR_STATUS_DATA),
31388    CHANGE_OPERATOR_CONTROL(CHANGE_OPERATOR_CONTROL_DATA),
31389    CHANGE_OPERATOR_CONTROL_ACK(CHANGE_OPERATOR_CONTROL_ACK_DATA),
31390    COLLISION(COLLISION_DATA),
31391    COMMAND_ACK(COMMAND_ACK_DATA),
31392    COMMAND_CANCEL(COMMAND_CANCEL_DATA),
31393    COMMAND_INT(COMMAND_INT_DATA),
31394    COMMAND_LONG(COMMAND_LONG_DATA),
31395    #[deprecated = " See `COMPONENT_METADATA` (Deprecated since 2022-04)"]
31396    COMPONENT_INFORMATION(COMPONENT_INFORMATION_DATA),
31397    COMPONENT_INFORMATION_BASIC(COMPONENT_INFORMATION_BASIC_DATA),
31398    COMPONENT_METADATA(COMPONENT_METADATA_DATA),
31399    CONTROL_SYSTEM_STATE(CONTROL_SYSTEM_STATE_DATA),
31400    CURRENT_EVENT_SEQUENCE(CURRENT_EVENT_SEQUENCE_DATA),
31401    CURRENT_MODE(CURRENT_MODE_DATA),
31402    #[deprecated = " See `MESSAGE_INTERVAL` (Deprecated since 2015-08)"]
31403    DATA_STREAM(DATA_STREAM_DATA),
31404    DATA_TRANSMISSION_HANDSHAKE(DATA_TRANSMISSION_HANDSHAKE_DATA),
31405    DEBUG(DEBUG_DATA),
31406    DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA),
31407    DEBUG_VECT(DEBUG_VECT_DATA),
31408    DISTANCE_SENSOR(DISTANCE_SENSOR_DATA),
31409    EFI_STATUS(EFI_STATUS_DATA),
31410    ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA),
31411    ESC_INFO(ESC_INFO_DATA),
31412    ESC_STATUS(ESC_STATUS_DATA),
31413    ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA),
31414    EVENT(EVENT_DATA),
31415    EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA),
31416    FENCE_STATUS(FENCE_STATUS_DATA),
31417    FILE_TRANSFER_PROTOCOL(FILE_TRANSFER_PROTOCOL_DATA),
31418    FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA),
31419    FOLLOW_TARGET(FOLLOW_TARGET_DATA),
31420    FUEL_STATUS(FUEL_STATUS_DATA),
31421    GENERATOR_STATUS(GENERATOR_STATUS_DATA),
31422    GIMBAL_DEVICE_ATTITUDE_STATUS(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA),
31423    GIMBAL_DEVICE_INFORMATION(GIMBAL_DEVICE_INFORMATION_DATA),
31424    GIMBAL_DEVICE_SET_ATTITUDE(GIMBAL_DEVICE_SET_ATTITUDE_DATA),
31425    GIMBAL_MANAGER_INFORMATION(GIMBAL_MANAGER_INFORMATION_DATA),
31426    GIMBAL_MANAGER_SET_ATTITUDE(GIMBAL_MANAGER_SET_ATTITUDE_DATA),
31427    GIMBAL_MANAGER_SET_MANUAL_CONTROL(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA),
31428    GIMBAL_MANAGER_SET_PITCHYAW(GIMBAL_MANAGER_SET_PITCHYAW_DATA),
31429    GIMBAL_MANAGER_STATUS(GIMBAL_MANAGER_STATUS_DATA),
31430    GLOBAL_POSITION_INT(GLOBAL_POSITION_INT_DATA),
31431    GLOBAL_POSITION_INT_COV(GLOBAL_POSITION_INT_COV_DATA),
31432    GLOBAL_VISION_POSITION_ESTIMATE(GLOBAL_VISION_POSITION_ESTIMATE_DATA),
31433    GPS2_RAW(GPS2_RAW_DATA),
31434    GPS2_RTK(GPS2_RTK_DATA),
31435    GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA),
31436    #[deprecated = " See `GPS_RTCM_DATA` (Deprecated since 2022-05)"]
31437    GPS_INJECT_DATA(GPS_INJECT_DATA_DATA),
31438    GPS_INPUT(GPS_INPUT_DATA),
31439    GPS_RAW_INT(GPS_RAW_INT_DATA),
31440    GPS_RTCM_DATA(GPS_RTCM_DATA_DATA),
31441    GPS_RTK(GPS_RTK_DATA),
31442    GPS_STATUS(GPS_STATUS_DATA),
31443    HEARTBEAT(HEARTBEAT_DATA),
31444    HIGHRES_IMU(HIGHRES_IMU_DATA),
31445    #[deprecated = " See `HIGH_LATENCY2` (Deprecated since 2020-10)"]
31446    HIGH_LATENCY(HIGH_LATENCY_DATA),
31447    HIGH_LATENCY2(HIGH_LATENCY2_DATA),
31448    HIL_ACTUATOR_CONTROLS(HIL_ACTUATOR_CONTROLS_DATA),
31449    HIL_CONTROLS(HIL_CONTROLS_DATA),
31450    HIL_GPS(HIL_GPS_DATA),
31451    HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA),
31452    HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA),
31453    HIL_SENSOR(HIL_SENSOR_DATA),
31454    #[deprecated = "Suffers from missing airspeed fields and singularities due to Euler angles. See `HIL_STATE_QUATERNION` (Deprecated since 2013-07)"]
31455    HIL_STATE(HIL_STATE_DATA),
31456    HIL_STATE_QUATERNION(HIL_STATE_QUATERNION_DATA),
31457    HOME_POSITION(HOME_POSITION_DATA),
31458    HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA),
31459    ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA),
31460    ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA),
31461    LANDING_TARGET(LANDING_TARGET_DATA),
31462    LINK_NODE_STATUS(LINK_NODE_STATUS_DATA),
31463    LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA),
31464    LOCAL_POSITION_NED_COV(LOCAL_POSITION_NED_COV_DATA),
31465    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA),
31466    LOGGING_ACK(LOGGING_ACK_DATA),
31467    LOGGING_DATA(LOGGING_DATA_DATA),
31468    LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA),
31469    LOG_DATA(LOG_DATA_DATA),
31470    LOG_ENTRY(LOG_ENTRY_DATA),
31471    LOG_ERASE(LOG_ERASE_DATA),
31472    LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA),
31473    LOG_REQUEST_END(LOG_REQUEST_END_DATA),
31474    LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA),
31475    MAG_CAL_REPORT(MAG_CAL_REPORT_DATA),
31476    MANUAL_CONTROL(MANUAL_CONTROL_DATA),
31477    MANUAL_SETPOINT(MANUAL_SETPOINT_DATA),
31478    MEMORY_VECT(MEMORY_VECT_DATA),
31479    MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA),
31480    MISSION_ACK(MISSION_ACK_DATA),
31481    MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA),
31482    MISSION_COUNT(MISSION_COUNT_DATA),
31483    MISSION_CURRENT(MISSION_CURRENT_DATA),
31484    #[deprecated = " See `MISSION_ITEM_INT` (Deprecated since 2020-06)"]
31485    MISSION_ITEM(MISSION_ITEM_DATA),
31486    MISSION_ITEM_INT(MISSION_ITEM_INT_DATA),
31487    MISSION_ITEM_REACHED(MISSION_ITEM_REACHED_DATA),
31488    #[deprecated = "A system that gets this request should respond with MISSION_ITEM_INT (as though MISSION_REQUEST_INT was received). See `MISSION_REQUEST_INT` (Deprecated since 2020-06)"]
31489    MISSION_REQUEST(MISSION_REQUEST_DATA),
31490    MISSION_REQUEST_INT(MISSION_REQUEST_INT_DATA),
31491    MISSION_REQUEST_LIST(MISSION_REQUEST_LIST_DATA),
31492    MISSION_REQUEST_PARTIAL_LIST(MISSION_REQUEST_PARTIAL_LIST_DATA),
31493    #[deprecated = " See `MAV_CMD_DO_SET_MISSION_CURRENT` (Deprecated since 2022-08)"]
31494    MISSION_SET_CURRENT(MISSION_SET_CURRENT_DATA),
31495    MISSION_WRITE_PARTIAL_LIST(MISSION_WRITE_PARTIAL_LIST_DATA),
31496    #[deprecated = "This message is being superseded by MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW. The message can still be used to communicate with legacy gimbals implementing it. See `MAV_CMD_DO_GIMBAL_MANAGER_PITCHYAW` (Deprecated since 2020-01)"]
31497    MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA),
31498    NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA),
31499    NAMED_VALUE_INT(NAMED_VALUE_INT_DATA),
31500    NAV_CONTROLLER_OUTPUT(NAV_CONTROLLER_OUTPUT_DATA),
31501    NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA),
31502    OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA),
31503    ODOMETRY(ODOMETRY_DATA),
31504    ONBOARD_COMPUTER_STATUS(ONBOARD_COMPUTER_STATUS_DATA),
31505    OPEN_DRONE_ID_ARM_STATUS(OPEN_DRONE_ID_ARM_STATUS_DATA),
31506    OPEN_DRONE_ID_AUTHENTICATION(OPEN_DRONE_ID_AUTHENTICATION_DATA),
31507    OPEN_DRONE_ID_BASIC_ID(OPEN_DRONE_ID_BASIC_ID_DATA),
31508    OPEN_DRONE_ID_LOCATION(OPEN_DRONE_ID_LOCATION_DATA),
31509    OPEN_DRONE_ID_MESSAGE_PACK(OPEN_DRONE_ID_MESSAGE_PACK_DATA),
31510    OPEN_DRONE_ID_OPERATOR_ID(OPEN_DRONE_ID_OPERATOR_ID_DATA),
31511    OPEN_DRONE_ID_SELF_ID(OPEN_DRONE_ID_SELF_ID_DATA),
31512    OPEN_DRONE_ID_SYSTEM(OPEN_DRONE_ID_SYSTEM_DATA),
31513    OPEN_DRONE_ID_SYSTEM_UPDATE(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA),
31514    OPTICAL_FLOW(OPTICAL_FLOW_DATA),
31515    OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA),
31516    ORBIT_EXECUTION_STATUS(ORBIT_EXECUTION_STATUS_DATA),
31517    PARAM_EXT_ACK(PARAM_EXT_ACK_DATA),
31518    PARAM_EXT_REQUEST_LIST(PARAM_EXT_REQUEST_LIST_DATA),
31519    PARAM_EXT_REQUEST_READ(PARAM_EXT_REQUEST_READ_DATA),
31520    PARAM_EXT_SET(PARAM_EXT_SET_DATA),
31521    PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA),
31522    PARAM_MAP_RC(PARAM_MAP_RC_DATA),
31523    PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA),
31524    PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA),
31525    PARAM_SET(PARAM_SET_DATA),
31526    PARAM_VALUE(PARAM_VALUE_DATA),
31527    #[deprecated = "To be removed / merged with TIMESYNC. See `TIMESYNC` (Deprecated since 2011-08)"]
31528    PING(PING_DATA),
31529    #[deprecated = "New version explicitly defines format. More interoperable. See `PLAY_TUNE_V2` (Deprecated since 2019-10)"]
31530    PLAY_TUNE(PLAY_TUNE_DATA),
31531    PLAY_TUNE_V2(PLAY_TUNE_V2_DATA),
31532    POSITION_TARGET_GLOBAL_INT(POSITION_TARGET_GLOBAL_INT_DATA),
31533    POSITION_TARGET_LOCAL_NED(POSITION_TARGET_LOCAL_NED_DATA),
31534    POWER_STATUS(POWER_STATUS_DATA),
31535    PROTOCOL_VERSION(PROTOCOL_VERSION_DATA),
31536    RADIO_CALIBRATION(RADIO_CALIBRATION_DATA),
31537    RADIO_STATUS(RADIO_STATUS_DATA),
31538    RAW_IMU(RAW_IMU_DATA),
31539    RAW_PRESSURE(RAW_PRESSURE_DATA),
31540    RAW_RPM(RAW_RPM_DATA),
31541    RC_CHANNELS(RC_CHANNELS_DATA),
31542    RC_CHANNELS_OVERRIDE(RC_CHANNELS_OVERRIDE_DATA),
31543    RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA),
31544    RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA),
31545    #[deprecated = " See `MAV_CMD_SET_MESSAGE_INTERVAL ` (Deprecated since 2015-08)"]
31546    REQUEST_DATA_STREAM(REQUEST_DATA_STREAM_DATA),
31547    REQUEST_EVENT(REQUEST_EVENT_DATA),
31548    RESOURCE_REQUEST(RESOURCE_REQUEST_DATA),
31549    RESPONSE_EVENT_ERROR(RESPONSE_EVENT_ERROR_DATA),
31550    SAFETY_ALLOWED_AREA(SAFETY_ALLOWED_AREA_DATA),
31551    SAFETY_SET_ALLOWED_AREA(SAFETY_SET_ALLOWED_AREA_DATA),
31552    SCALED_IMU(SCALED_IMU_DATA),
31553    SCALED_IMU2(SCALED_IMU2_DATA),
31554    SCALED_IMU3(SCALED_IMU3_DATA),
31555    SCALED_PRESSURE(SCALED_PRESSURE_DATA),
31556    SCALED_PRESSURE2(SCALED_PRESSURE2_DATA),
31557    SCALED_PRESSURE3(SCALED_PRESSURE3_DATA),
31558    SERIAL_CONTROL(SERIAL_CONTROL_DATA),
31559    SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA),
31560    SETUP_SIGNING(SETUP_SIGNING_DATA),
31561    SET_ACTUATOR_CONTROL_TARGET(SET_ACTUATOR_CONTROL_TARGET_DATA),
31562    SET_ATTITUDE_TARGET(SET_ATTITUDE_TARGET_DATA),
31563    #[deprecated = " See `MAV_CMD_SET_GLOBAL_ORIGIN` (Deprecated since 2025-04)"]
31564    SET_GPS_GLOBAL_ORIGIN(SET_GPS_GLOBAL_ORIGIN_DATA),
31565    #[deprecated = "The command protocol version (MAV_CMD_DO_SET_HOME) allows a GCS to detect when setting the home position has failed. See `MAV_CMD_DO_SET_HOME` (Deprecated since 2022-02)"]
31566    SET_HOME_POSITION(SET_HOME_POSITION_DATA),
31567    #[deprecated = "Use COMMAND_LONG with MAV_CMD_DO_SET_MODE instead. See `MAV_CMD_DO_SET_MODE` (Deprecated since 2015-12)"]
31568    SET_MODE(SET_MODE_DATA),
31569    SET_POSITION_TARGET_GLOBAL_INT(SET_POSITION_TARGET_GLOBAL_INT_DATA),
31570    SET_POSITION_TARGET_LOCAL_NED(SET_POSITION_TARGET_LOCAL_NED_DATA),
31571    SIM_STATE(SIM_STATE_DATA),
31572    #[deprecated = "The BATTERY_INFO message is better aligned with UAVCAN messages, and in any case is useful even if a battery is not \"smart\". See `BATTERY_INFO` (Deprecated since 2024-02)"]
31573    SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA),
31574    STATUSTEXT(STATUSTEXT_DATA),
31575    STORAGE_INFORMATION(STORAGE_INFORMATION_DATA),
31576    SUPPORTED_TUNES(SUPPORTED_TUNES_DATA),
31577    SYSTEM_TIME(SYSTEM_TIME_DATA),
31578    SYS_STATUS(SYS_STATUS_DATA),
31579    TERRAIN_CHECK(TERRAIN_CHECK_DATA),
31580    TERRAIN_DATA(TERRAIN_DATA_DATA),
31581    TERRAIN_REPORT(TERRAIN_REPORT_DATA),
31582    TERRAIN_REQUEST(TERRAIN_REQUEST_DATA),
31583    TIMESYNC(TIMESYNC_DATA),
31584    TIME_ESTIMATE_TO_TARGET(TIME_ESTIMATE_TO_TARGET_DATA),
31585    TRAJECTORY_REPRESENTATION_BEZIER(TRAJECTORY_REPRESENTATION_BEZIER_DATA),
31586    TRAJECTORY_REPRESENTATION_WAYPOINTS(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA),
31587    TUNNEL(TUNNEL_DATA),
31588    UALBERTA_SYS_STATUS(UALBERTA_SYS_STATUS_DATA),
31589    UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA),
31590    UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA),
31591    UTM_GLOBAL_POSITION(UTM_GLOBAL_POSITION_DATA),
31592    V2_EXTENSION(V2_EXTENSION_DATA),
31593    VFR_HUD(VFR_HUD_DATA),
31594    VIBRATION(VIBRATION_DATA),
31595    VICON_POSITION_ESTIMATE(VICON_POSITION_ESTIMATE_DATA),
31596    VIDEO_STREAM_INFORMATION(VIDEO_STREAM_INFORMATION_DATA),
31597    VIDEO_STREAM_STATUS(VIDEO_STREAM_STATUS_DATA),
31598    VISION_POSITION_ESTIMATE(VISION_POSITION_ESTIMATE_DATA),
31599    VISION_SPEED_ESTIMATE(VISION_SPEED_ESTIMATE_DATA),
31600    WHEEL_DISTANCE(WHEEL_DISTANCE_DATA),
31601    WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA),
31602    WINCH_STATUS(WINCH_STATUS_DATA),
31603    WIND_COV(WIND_COV_DATA),
31604}
31605impl MavMessage {
31606    pub const fn all_ids() -> &'static [u32] {
31607        &[
31608            0u32, 1u32, 2u32, 4u32, 5u32, 6u32, 7u32, 8u32, 11u32, 20u32, 21u32, 22u32, 23u32,
31609            24u32, 25u32, 26u32, 27u32, 28u32, 29u32, 30u32, 31u32, 32u32, 33u32, 34u32, 35u32,
31610            36u32, 37u32, 38u32, 39u32, 40u32, 41u32, 42u32, 43u32, 44u32, 45u32, 46u32, 47u32,
31611            48u32, 49u32, 50u32, 51u32, 54u32, 55u32, 61u32, 62u32, 63u32, 64u32, 65u32, 66u32,
31612            67u32, 69u32, 70u32, 73u32, 74u32, 75u32, 76u32, 77u32, 80u32, 81u32, 82u32, 83u32,
31613            84u32, 85u32, 86u32, 87u32, 89u32, 90u32, 91u32, 92u32, 93u32, 100u32, 101u32, 102u32,
31614            103u32, 104u32, 105u32, 106u32, 107u32, 108u32, 109u32, 110u32, 111u32, 112u32, 113u32,
31615            114u32, 115u32, 116u32, 117u32, 118u32, 119u32, 120u32, 121u32, 122u32, 123u32, 124u32,
31616            125u32, 126u32, 127u32, 128u32, 129u32, 130u32, 131u32, 132u32, 133u32, 134u32, 135u32,
31617            136u32, 137u32, 138u32, 139u32, 140u32, 141u32, 142u32, 143u32, 144u32, 146u32, 147u32,
31618            148u32, 149u32, 162u32, 192u32, 220u32, 221u32, 222u32, 225u32, 230u32, 231u32, 232u32,
31619            233u32, 234u32, 235u32, 241u32, 242u32, 243u32, 244u32, 245u32, 246u32, 247u32, 248u32,
31620            249u32, 250u32, 251u32, 252u32, 253u32, 254u32, 256u32, 257u32, 258u32, 259u32, 260u32,
31621            261u32, 262u32, 263u32, 264u32, 265u32, 266u32, 267u32, 268u32, 269u32, 270u32, 271u32,
31622            275u32, 276u32, 277u32, 280u32, 281u32, 282u32, 283u32, 284u32, 285u32, 286u32, 287u32,
31623            288u32, 290u32, 291u32, 299u32, 300u32, 301u32, 310u32, 311u32, 320u32, 321u32, 322u32,
31624            323u32, 324u32, 330u32, 331u32, 332u32, 333u32, 334u32, 335u32, 336u32, 339u32, 340u32,
31625            350u32, 360u32, 370u32, 371u32, 372u32, 373u32, 375u32, 380u32, 385u32, 386u32, 387u32,
31626            388u32, 390u32, 395u32, 396u32, 397u32, 400u32, 401u32, 410u32, 411u32, 412u32, 413u32,
31627            435u32, 436u32, 437u32, 440u32, 9000u32, 9005u32, 12900u32, 12901u32, 12902u32,
31628            12903u32, 12904u32, 12905u32, 12915u32, 12918u32, 12919u32, 12920u32,
31629        ]
31630    }
31631}
31632impl Message for MavMessage {
31633    fn parse(
31634        version: MavlinkVersion,
31635        id: u32,
31636        payload: &[u8],
31637    ) -> Result<Self, ::mavlink_core::error::ParserError> {
31638        match id {
31639            ACTUATOR_CONTROL_TARGET_DATA::ID => {
31640                ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
31641                    .map(Self::ACTUATOR_CONTROL_TARGET)
31642            }
31643            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::deser(version, payload)
31644                .map(Self::ACTUATOR_OUTPUT_STATUS),
31645            ADSB_VEHICLE_DATA::ID => {
31646                ADSB_VEHICLE_DATA::deser(version, payload).map(Self::ADSB_VEHICLE)
31647            }
31648            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::deser(version, payload).map(Self::AIS_VESSEL),
31649            ALTITUDE_DATA::ID => ALTITUDE_DATA::deser(version, payload).map(Self::ALTITUDE),
31650            ATTITUDE_DATA::ID => ATTITUDE_DATA::deser(version, payload).map(Self::ATTITUDE),
31651            ATTITUDE_QUATERNION_DATA::ID => {
31652                ATTITUDE_QUATERNION_DATA::deser(version, payload).map(Self::ATTITUDE_QUATERNION)
31653            }
31654            ATTITUDE_QUATERNION_COV_DATA::ID => {
31655                ATTITUDE_QUATERNION_COV_DATA::deser(version, payload)
31656                    .map(Self::ATTITUDE_QUATERNION_COV)
31657            }
31658            ATTITUDE_TARGET_DATA::ID => {
31659                ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::ATTITUDE_TARGET)
31660            }
31661            ATT_POS_MOCAP_DATA::ID => {
31662                ATT_POS_MOCAP_DATA::deser(version, payload).map(Self::ATT_POS_MOCAP)
31663            }
31664            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::deser(version, payload).map(Self::AUTH_KEY),
31665            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
31666                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::deser(version, payload)
31667                    .map(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE)
31668            }
31669            AUTOPILOT_VERSION_DATA::ID => {
31670                AUTOPILOT_VERSION_DATA::deser(version, payload).map(Self::AUTOPILOT_VERSION)
31671            }
31672            AVAILABLE_MODES_DATA::ID => {
31673                AVAILABLE_MODES_DATA::deser(version, payload).map(Self::AVAILABLE_MODES)
31674            }
31675            AVAILABLE_MODES_MONITOR_DATA::ID => {
31676                AVAILABLE_MODES_MONITOR_DATA::deser(version, payload)
31677                    .map(Self::AVAILABLE_MODES_MONITOR)
31678            }
31679            BATTERY_INFO_DATA::ID => {
31680                BATTERY_INFO_DATA::deser(version, payload).map(Self::BATTERY_INFO)
31681            }
31682            BATTERY_STATUS_DATA::ID => {
31683                BATTERY_STATUS_DATA::deser(version, payload).map(Self::BATTERY_STATUS)
31684            }
31685            BUTTON_CHANGE_DATA::ID => {
31686                BUTTON_CHANGE_DATA::deser(version, payload).map(Self::BUTTON_CHANGE)
31687            }
31688            CAMERA_CAPTURE_STATUS_DATA::ID => {
31689                CAMERA_CAPTURE_STATUS_DATA::deser(version, payload).map(Self::CAMERA_CAPTURE_STATUS)
31690            }
31691            CAMERA_FOV_STATUS_DATA::ID => {
31692                CAMERA_FOV_STATUS_DATA::deser(version, payload).map(Self::CAMERA_FOV_STATUS)
31693            }
31694            CAMERA_IMAGE_CAPTURED_DATA::ID => {
31695                CAMERA_IMAGE_CAPTURED_DATA::deser(version, payload).map(Self::CAMERA_IMAGE_CAPTURED)
31696            }
31697            CAMERA_INFORMATION_DATA::ID => {
31698                CAMERA_INFORMATION_DATA::deser(version, payload).map(Self::CAMERA_INFORMATION)
31699            }
31700            CAMERA_SETTINGS_DATA::ID => {
31701                CAMERA_SETTINGS_DATA::deser(version, payload).map(Self::CAMERA_SETTINGS)
31702            }
31703            CAMERA_THERMAL_RANGE_DATA::ID => {
31704                CAMERA_THERMAL_RANGE_DATA::deser(version, payload).map(Self::CAMERA_THERMAL_RANGE)
31705            }
31706            CAMERA_TRACKING_GEO_STATUS_DATA::ID => {
31707                CAMERA_TRACKING_GEO_STATUS_DATA::deser(version, payload)
31708                    .map(Self::CAMERA_TRACKING_GEO_STATUS)
31709            }
31710            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => {
31711                CAMERA_TRACKING_IMAGE_STATUS_DATA::deser(version, payload)
31712                    .map(Self::CAMERA_TRACKING_IMAGE_STATUS)
31713            }
31714            CAMERA_TRIGGER_DATA::ID => {
31715                CAMERA_TRIGGER_DATA::deser(version, payload).map(Self::CAMERA_TRIGGER)
31716            }
31717            CANFD_FRAME_DATA::ID => {
31718                CANFD_FRAME_DATA::deser(version, payload).map(Self::CANFD_FRAME)
31719            }
31720            CAN_FILTER_MODIFY_DATA::ID => {
31721                CAN_FILTER_MODIFY_DATA::deser(version, payload).map(Self::CAN_FILTER_MODIFY)
31722            }
31723            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::deser(version, payload).map(Self::CAN_FRAME),
31724            CELLULAR_CONFIG_DATA::ID => {
31725                CELLULAR_CONFIG_DATA::deser(version, payload).map(Self::CELLULAR_CONFIG)
31726            }
31727            CELLULAR_STATUS_DATA::ID => {
31728                CELLULAR_STATUS_DATA::deser(version, payload).map(Self::CELLULAR_STATUS)
31729            }
31730            CHANGE_OPERATOR_CONTROL_DATA::ID => {
31731                CHANGE_OPERATOR_CONTROL_DATA::deser(version, payload)
31732                    .map(Self::CHANGE_OPERATOR_CONTROL)
31733            }
31734            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => {
31735                CHANGE_OPERATOR_CONTROL_ACK_DATA::deser(version, payload)
31736                    .map(Self::CHANGE_OPERATOR_CONTROL_ACK)
31737            }
31738            COLLISION_DATA::ID => COLLISION_DATA::deser(version, payload).map(Self::COLLISION),
31739            COMMAND_ACK_DATA::ID => {
31740                COMMAND_ACK_DATA::deser(version, payload).map(Self::COMMAND_ACK)
31741            }
31742            COMMAND_CANCEL_DATA::ID => {
31743                COMMAND_CANCEL_DATA::deser(version, payload).map(Self::COMMAND_CANCEL)
31744            }
31745            COMMAND_INT_DATA::ID => {
31746                COMMAND_INT_DATA::deser(version, payload).map(Self::COMMAND_INT)
31747            }
31748            COMMAND_LONG_DATA::ID => {
31749                COMMAND_LONG_DATA::deser(version, payload).map(Self::COMMAND_LONG)
31750            }
31751            COMPONENT_INFORMATION_DATA::ID => {
31752                COMPONENT_INFORMATION_DATA::deser(version, payload).map(Self::COMPONENT_INFORMATION)
31753            }
31754            COMPONENT_INFORMATION_BASIC_DATA::ID => {
31755                COMPONENT_INFORMATION_BASIC_DATA::deser(version, payload)
31756                    .map(Self::COMPONENT_INFORMATION_BASIC)
31757            }
31758            COMPONENT_METADATA_DATA::ID => {
31759                COMPONENT_METADATA_DATA::deser(version, payload).map(Self::COMPONENT_METADATA)
31760            }
31761            CONTROL_SYSTEM_STATE_DATA::ID => {
31762                CONTROL_SYSTEM_STATE_DATA::deser(version, payload).map(Self::CONTROL_SYSTEM_STATE)
31763            }
31764            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::deser(version, payload)
31765                .map(Self::CURRENT_EVENT_SEQUENCE),
31766            CURRENT_MODE_DATA::ID => {
31767                CURRENT_MODE_DATA::deser(version, payload).map(Self::CURRENT_MODE)
31768            }
31769            DATA_STREAM_DATA::ID => {
31770                DATA_STREAM_DATA::deser(version, payload).map(Self::DATA_STREAM)
31771            }
31772            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => {
31773                DATA_TRANSMISSION_HANDSHAKE_DATA::deser(version, payload)
31774                    .map(Self::DATA_TRANSMISSION_HANDSHAKE)
31775            }
31776            DEBUG_DATA::ID => DEBUG_DATA::deser(version, payload).map(Self::DEBUG),
31777            DEBUG_FLOAT_ARRAY_DATA::ID => {
31778                DEBUG_FLOAT_ARRAY_DATA::deser(version, payload).map(Self::DEBUG_FLOAT_ARRAY)
31779            }
31780            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::deser(version, payload).map(Self::DEBUG_VECT),
31781            DISTANCE_SENSOR_DATA::ID => {
31782                DISTANCE_SENSOR_DATA::deser(version, payload).map(Self::DISTANCE_SENSOR)
31783            }
31784            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::deser(version, payload).map(Self::EFI_STATUS),
31785            ENCAPSULATED_DATA_DATA::ID => {
31786                ENCAPSULATED_DATA_DATA::deser(version, payload).map(Self::ENCAPSULATED_DATA)
31787            }
31788            ESC_INFO_DATA::ID => ESC_INFO_DATA::deser(version, payload).map(Self::ESC_INFO),
31789            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::deser(version, payload).map(Self::ESC_STATUS),
31790            ESTIMATOR_STATUS_DATA::ID => {
31791                ESTIMATOR_STATUS_DATA::deser(version, payload).map(Self::ESTIMATOR_STATUS)
31792            }
31793            EVENT_DATA::ID => EVENT_DATA::deser(version, payload).map(Self::EVENT),
31794            EXTENDED_SYS_STATE_DATA::ID => {
31795                EXTENDED_SYS_STATE_DATA::deser(version, payload).map(Self::EXTENDED_SYS_STATE)
31796            }
31797            FENCE_STATUS_DATA::ID => {
31798                FENCE_STATUS_DATA::deser(version, payload).map(Self::FENCE_STATUS)
31799            }
31800            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::deser(version, payload)
31801                .map(Self::FILE_TRANSFER_PROTOCOL),
31802            FLIGHT_INFORMATION_DATA::ID => {
31803                FLIGHT_INFORMATION_DATA::deser(version, payload).map(Self::FLIGHT_INFORMATION)
31804            }
31805            FOLLOW_TARGET_DATA::ID => {
31806                FOLLOW_TARGET_DATA::deser(version, payload).map(Self::FOLLOW_TARGET)
31807            }
31808            FUEL_STATUS_DATA::ID => {
31809                FUEL_STATUS_DATA::deser(version, payload).map(Self::FUEL_STATUS)
31810            }
31811            GENERATOR_STATUS_DATA::ID => {
31812                GENERATOR_STATUS_DATA::deser(version, payload).map(Self::GENERATOR_STATUS)
31813            }
31814            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => {
31815                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::deser(version, payload)
31816                    .map(Self::GIMBAL_DEVICE_ATTITUDE_STATUS)
31817            }
31818            GIMBAL_DEVICE_INFORMATION_DATA::ID => {
31819                GIMBAL_DEVICE_INFORMATION_DATA::deser(version, payload)
31820                    .map(Self::GIMBAL_DEVICE_INFORMATION)
31821            }
31822            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => {
31823                GIMBAL_DEVICE_SET_ATTITUDE_DATA::deser(version, payload)
31824                    .map(Self::GIMBAL_DEVICE_SET_ATTITUDE)
31825            }
31826            GIMBAL_MANAGER_INFORMATION_DATA::ID => {
31827                GIMBAL_MANAGER_INFORMATION_DATA::deser(version, payload)
31828                    .map(Self::GIMBAL_MANAGER_INFORMATION)
31829            }
31830            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => {
31831                GIMBAL_MANAGER_SET_ATTITUDE_DATA::deser(version, payload)
31832                    .map(Self::GIMBAL_MANAGER_SET_ATTITUDE)
31833            }
31834            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
31835                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::deser(version, payload)
31836                    .map(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL)
31837            }
31838            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => {
31839                GIMBAL_MANAGER_SET_PITCHYAW_DATA::deser(version, payload)
31840                    .map(Self::GIMBAL_MANAGER_SET_PITCHYAW)
31841            }
31842            GIMBAL_MANAGER_STATUS_DATA::ID => {
31843                GIMBAL_MANAGER_STATUS_DATA::deser(version, payload).map(Self::GIMBAL_MANAGER_STATUS)
31844            }
31845            GLOBAL_POSITION_INT_DATA::ID => {
31846                GLOBAL_POSITION_INT_DATA::deser(version, payload).map(Self::GLOBAL_POSITION_INT)
31847            }
31848            GLOBAL_POSITION_INT_COV_DATA::ID => {
31849                GLOBAL_POSITION_INT_COV_DATA::deser(version, payload)
31850                    .map(Self::GLOBAL_POSITION_INT_COV)
31851            }
31852            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
31853                GLOBAL_VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
31854                    .map(Self::GLOBAL_VISION_POSITION_ESTIMATE)
31855            }
31856            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::deser(version, payload).map(Self::GPS2_RAW),
31857            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::deser(version, payload).map(Self::GPS2_RTK),
31858            GPS_GLOBAL_ORIGIN_DATA::ID => {
31859                GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::GPS_GLOBAL_ORIGIN)
31860            }
31861            GPS_INJECT_DATA_DATA::ID => {
31862                GPS_INJECT_DATA_DATA::deser(version, payload).map(Self::GPS_INJECT_DATA)
31863            }
31864            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::deser(version, payload).map(Self::GPS_INPUT),
31865            GPS_RAW_INT_DATA::ID => {
31866                GPS_RAW_INT_DATA::deser(version, payload).map(Self::GPS_RAW_INT)
31867            }
31868            GPS_RTCM_DATA_DATA::ID => {
31869                GPS_RTCM_DATA_DATA::deser(version, payload).map(Self::GPS_RTCM_DATA)
31870            }
31871            GPS_RTK_DATA::ID => GPS_RTK_DATA::deser(version, payload).map(Self::GPS_RTK),
31872            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::deser(version, payload).map(Self::GPS_STATUS),
31873            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::deser(version, payload).map(Self::HEARTBEAT),
31874            HIGHRES_IMU_DATA::ID => {
31875                HIGHRES_IMU_DATA::deser(version, payload).map(Self::HIGHRES_IMU)
31876            }
31877            HIGH_LATENCY_DATA::ID => {
31878                HIGH_LATENCY_DATA::deser(version, payload).map(Self::HIGH_LATENCY)
31879            }
31880            HIGH_LATENCY2_DATA::ID => {
31881                HIGH_LATENCY2_DATA::deser(version, payload).map(Self::HIGH_LATENCY2)
31882            }
31883            HIL_ACTUATOR_CONTROLS_DATA::ID => {
31884                HIL_ACTUATOR_CONTROLS_DATA::deser(version, payload).map(Self::HIL_ACTUATOR_CONTROLS)
31885            }
31886            HIL_CONTROLS_DATA::ID => {
31887                HIL_CONTROLS_DATA::deser(version, payload).map(Self::HIL_CONTROLS)
31888            }
31889            HIL_GPS_DATA::ID => HIL_GPS_DATA::deser(version, payload).map(Self::HIL_GPS),
31890            HIL_OPTICAL_FLOW_DATA::ID => {
31891                HIL_OPTICAL_FLOW_DATA::deser(version, payload).map(Self::HIL_OPTICAL_FLOW)
31892            }
31893            HIL_RC_INPUTS_RAW_DATA::ID => {
31894                HIL_RC_INPUTS_RAW_DATA::deser(version, payload).map(Self::HIL_RC_INPUTS_RAW)
31895            }
31896            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::deser(version, payload).map(Self::HIL_SENSOR),
31897            HIL_STATE_DATA::ID => HIL_STATE_DATA::deser(version, payload).map(Self::HIL_STATE),
31898            HIL_STATE_QUATERNION_DATA::ID => {
31899                HIL_STATE_QUATERNION_DATA::deser(version, payload).map(Self::HIL_STATE_QUATERNION)
31900            }
31901            HOME_POSITION_DATA::ID => {
31902                HOME_POSITION_DATA::deser(version, payload).map(Self::HOME_POSITION)
31903            }
31904            HYGROMETER_SENSOR_DATA::ID => {
31905                HYGROMETER_SENSOR_DATA::deser(version, payload).map(Self::HYGROMETER_SENSOR)
31906            }
31907            ILLUMINATOR_STATUS_DATA::ID => {
31908                ILLUMINATOR_STATUS_DATA::deser(version, payload).map(Self::ILLUMINATOR_STATUS)
31909            }
31910            ISBD_LINK_STATUS_DATA::ID => {
31911                ISBD_LINK_STATUS_DATA::deser(version, payload).map(Self::ISBD_LINK_STATUS)
31912            }
31913            LANDING_TARGET_DATA::ID => {
31914                LANDING_TARGET_DATA::deser(version, payload).map(Self::LANDING_TARGET)
31915            }
31916            LINK_NODE_STATUS_DATA::ID => {
31917                LINK_NODE_STATUS_DATA::deser(version, payload).map(Self::LINK_NODE_STATUS)
31918            }
31919            LOCAL_POSITION_NED_DATA::ID => {
31920                LOCAL_POSITION_NED_DATA::deser(version, payload).map(Self::LOCAL_POSITION_NED)
31921            }
31922            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::deser(version, payload)
31923                .map(Self::LOCAL_POSITION_NED_COV),
31924            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
31925                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::deser(version, payload)
31926                    .map(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET)
31927            }
31928            LOGGING_ACK_DATA::ID => {
31929                LOGGING_ACK_DATA::deser(version, payload).map(Self::LOGGING_ACK)
31930            }
31931            LOGGING_DATA_DATA::ID => {
31932                LOGGING_DATA_DATA::deser(version, payload).map(Self::LOGGING_DATA)
31933            }
31934            LOGGING_DATA_ACKED_DATA::ID => {
31935                LOGGING_DATA_ACKED_DATA::deser(version, payload).map(Self::LOGGING_DATA_ACKED)
31936            }
31937            LOG_DATA_DATA::ID => LOG_DATA_DATA::deser(version, payload).map(Self::LOG_DATA),
31938            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::deser(version, payload).map(Self::LOG_ENTRY),
31939            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::deser(version, payload).map(Self::LOG_ERASE),
31940            LOG_REQUEST_DATA_DATA::ID => {
31941                LOG_REQUEST_DATA_DATA::deser(version, payload).map(Self::LOG_REQUEST_DATA)
31942            }
31943            LOG_REQUEST_END_DATA::ID => {
31944                LOG_REQUEST_END_DATA::deser(version, payload).map(Self::LOG_REQUEST_END)
31945            }
31946            LOG_REQUEST_LIST_DATA::ID => {
31947                LOG_REQUEST_LIST_DATA::deser(version, payload).map(Self::LOG_REQUEST_LIST)
31948            }
31949            MAG_CAL_REPORT_DATA::ID => {
31950                MAG_CAL_REPORT_DATA::deser(version, payload).map(Self::MAG_CAL_REPORT)
31951            }
31952            MANUAL_CONTROL_DATA::ID => {
31953                MANUAL_CONTROL_DATA::deser(version, payload).map(Self::MANUAL_CONTROL)
31954            }
31955            MANUAL_SETPOINT_DATA::ID => {
31956                MANUAL_SETPOINT_DATA::deser(version, payload).map(Self::MANUAL_SETPOINT)
31957            }
31958            MEMORY_VECT_DATA::ID => {
31959                MEMORY_VECT_DATA::deser(version, payload).map(Self::MEMORY_VECT)
31960            }
31961            MESSAGE_INTERVAL_DATA::ID => {
31962                MESSAGE_INTERVAL_DATA::deser(version, payload).map(Self::MESSAGE_INTERVAL)
31963            }
31964            MISSION_ACK_DATA::ID => {
31965                MISSION_ACK_DATA::deser(version, payload).map(Self::MISSION_ACK)
31966            }
31967            MISSION_CLEAR_ALL_DATA::ID => {
31968                MISSION_CLEAR_ALL_DATA::deser(version, payload).map(Self::MISSION_CLEAR_ALL)
31969            }
31970            MISSION_COUNT_DATA::ID => {
31971                MISSION_COUNT_DATA::deser(version, payload).map(Self::MISSION_COUNT)
31972            }
31973            MISSION_CURRENT_DATA::ID => {
31974                MISSION_CURRENT_DATA::deser(version, payload).map(Self::MISSION_CURRENT)
31975            }
31976            MISSION_ITEM_DATA::ID => {
31977                MISSION_ITEM_DATA::deser(version, payload).map(Self::MISSION_ITEM)
31978            }
31979            MISSION_ITEM_INT_DATA::ID => {
31980                MISSION_ITEM_INT_DATA::deser(version, payload).map(Self::MISSION_ITEM_INT)
31981            }
31982            MISSION_ITEM_REACHED_DATA::ID => {
31983                MISSION_ITEM_REACHED_DATA::deser(version, payload).map(Self::MISSION_ITEM_REACHED)
31984            }
31985            MISSION_REQUEST_DATA::ID => {
31986                MISSION_REQUEST_DATA::deser(version, payload).map(Self::MISSION_REQUEST)
31987            }
31988            MISSION_REQUEST_INT_DATA::ID => {
31989                MISSION_REQUEST_INT_DATA::deser(version, payload).map(Self::MISSION_REQUEST_INT)
31990            }
31991            MISSION_REQUEST_LIST_DATA::ID => {
31992                MISSION_REQUEST_LIST_DATA::deser(version, payload).map(Self::MISSION_REQUEST_LIST)
31993            }
31994            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => {
31995                MISSION_REQUEST_PARTIAL_LIST_DATA::deser(version, payload)
31996                    .map(Self::MISSION_REQUEST_PARTIAL_LIST)
31997            }
31998            MISSION_SET_CURRENT_DATA::ID => {
31999                MISSION_SET_CURRENT_DATA::deser(version, payload).map(Self::MISSION_SET_CURRENT)
32000            }
32001            MISSION_WRITE_PARTIAL_LIST_DATA::ID => {
32002                MISSION_WRITE_PARTIAL_LIST_DATA::deser(version, payload)
32003                    .map(Self::MISSION_WRITE_PARTIAL_LIST)
32004            }
32005            MOUNT_ORIENTATION_DATA::ID => {
32006                MOUNT_ORIENTATION_DATA::deser(version, payload).map(Self::MOUNT_ORIENTATION)
32007            }
32008            NAMED_VALUE_FLOAT_DATA::ID => {
32009                NAMED_VALUE_FLOAT_DATA::deser(version, payload).map(Self::NAMED_VALUE_FLOAT)
32010            }
32011            NAMED_VALUE_INT_DATA::ID => {
32012                NAMED_VALUE_INT_DATA::deser(version, payload).map(Self::NAMED_VALUE_INT)
32013            }
32014            NAV_CONTROLLER_OUTPUT_DATA::ID => {
32015                NAV_CONTROLLER_OUTPUT_DATA::deser(version, payload).map(Self::NAV_CONTROLLER_OUTPUT)
32016            }
32017            NAV_FILTER_BIAS_DATA::ID => {
32018                NAV_FILTER_BIAS_DATA::deser(version, payload).map(Self::NAV_FILTER_BIAS)
32019            }
32020            OBSTACLE_DISTANCE_DATA::ID => {
32021                OBSTACLE_DISTANCE_DATA::deser(version, payload).map(Self::OBSTACLE_DISTANCE)
32022            }
32023            ODOMETRY_DATA::ID => ODOMETRY_DATA::deser(version, payload).map(Self::ODOMETRY),
32024            ONBOARD_COMPUTER_STATUS_DATA::ID => {
32025                ONBOARD_COMPUTER_STATUS_DATA::deser(version, payload)
32026                    .map(Self::ONBOARD_COMPUTER_STATUS)
32027            }
32028            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => {
32029                OPEN_DRONE_ID_ARM_STATUS_DATA::deser(version, payload)
32030                    .map(Self::OPEN_DRONE_ID_ARM_STATUS)
32031            }
32032            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => {
32033                OPEN_DRONE_ID_AUTHENTICATION_DATA::deser(version, payload)
32034                    .map(Self::OPEN_DRONE_ID_AUTHENTICATION)
32035            }
32036            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::deser(version, payload)
32037                .map(Self::OPEN_DRONE_ID_BASIC_ID),
32038            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::deser(version, payload)
32039                .map(Self::OPEN_DRONE_ID_LOCATION),
32040            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => {
32041                OPEN_DRONE_ID_MESSAGE_PACK_DATA::deser(version, payload)
32042                    .map(Self::OPEN_DRONE_ID_MESSAGE_PACK)
32043            }
32044            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => {
32045                OPEN_DRONE_ID_OPERATOR_ID_DATA::deser(version, payload)
32046                    .map(Self::OPEN_DRONE_ID_OPERATOR_ID)
32047            }
32048            OPEN_DRONE_ID_SELF_ID_DATA::ID => {
32049                OPEN_DRONE_ID_SELF_ID_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SELF_ID)
32050            }
32051            OPEN_DRONE_ID_SYSTEM_DATA::ID => {
32052                OPEN_DRONE_ID_SYSTEM_DATA::deser(version, payload).map(Self::OPEN_DRONE_ID_SYSTEM)
32053            }
32054            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => {
32055                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::deser(version, payload)
32056                    .map(Self::OPEN_DRONE_ID_SYSTEM_UPDATE)
32057            }
32058            OPTICAL_FLOW_DATA::ID => {
32059                OPTICAL_FLOW_DATA::deser(version, payload).map(Self::OPTICAL_FLOW)
32060            }
32061            OPTICAL_FLOW_RAD_DATA::ID => {
32062                OPTICAL_FLOW_RAD_DATA::deser(version, payload).map(Self::OPTICAL_FLOW_RAD)
32063            }
32064            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::deser(version, payload)
32065                .map(Self::ORBIT_EXECUTION_STATUS),
32066            PARAM_EXT_ACK_DATA::ID => {
32067                PARAM_EXT_ACK_DATA::deser(version, payload).map(Self::PARAM_EXT_ACK)
32068            }
32069            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::deser(version, payload)
32070                .map(Self::PARAM_EXT_REQUEST_LIST),
32071            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::deser(version, payload)
32072                .map(Self::PARAM_EXT_REQUEST_READ),
32073            PARAM_EXT_SET_DATA::ID => {
32074                PARAM_EXT_SET_DATA::deser(version, payload).map(Self::PARAM_EXT_SET)
32075            }
32076            PARAM_EXT_VALUE_DATA::ID => {
32077                PARAM_EXT_VALUE_DATA::deser(version, payload).map(Self::PARAM_EXT_VALUE)
32078            }
32079            PARAM_MAP_RC_DATA::ID => {
32080                PARAM_MAP_RC_DATA::deser(version, payload).map(Self::PARAM_MAP_RC)
32081            }
32082            PARAM_REQUEST_LIST_DATA::ID => {
32083                PARAM_REQUEST_LIST_DATA::deser(version, payload).map(Self::PARAM_REQUEST_LIST)
32084            }
32085            PARAM_REQUEST_READ_DATA::ID => {
32086                PARAM_REQUEST_READ_DATA::deser(version, payload).map(Self::PARAM_REQUEST_READ)
32087            }
32088            PARAM_SET_DATA::ID => PARAM_SET_DATA::deser(version, payload).map(Self::PARAM_SET),
32089            PARAM_VALUE_DATA::ID => {
32090                PARAM_VALUE_DATA::deser(version, payload).map(Self::PARAM_VALUE)
32091            }
32092            PING_DATA::ID => PING_DATA::deser(version, payload).map(Self::PING),
32093            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::deser(version, payload).map(Self::PLAY_TUNE),
32094            PLAY_TUNE_V2_DATA::ID => {
32095                PLAY_TUNE_V2_DATA::deser(version, payload).map(Self::PLAY_TUNE_V2)
32096            }
32097            POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32098                POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32099                    .map(Self::POSITION_TARGET_GLOBAL_INT)
32100            }
32101            POSITION_TARGET_LOCAL_NED_DATA::ID => {
32102                POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32103                    .map(Self::POSITION_TARGET_LOCAL_NED)
32104            }
32105            POWER_STATUS_DATA::ID => {
32106                POWER_STATUS_DATA::deser(version, payload).map(Self::POWER_STATUS)
32107            }
32108            PROTOCOL_VERSION_DATA::ID => {
32109                PROTOCOL_VERSION_DATA::deser(version, payload).map(Self::PROTOCOL_VERSION)
32110            }
32111            RADIO_CALIBRATION_DATA::ID => {
32112                RADIO_CALIBRATION_DATA::deser(version, payload).map(Self::RADIO_CALIBRATION)
32113            }
32114            RADIO_STATUS_DATA::ID => {
32115                RADIO_STATUS_DATA::deser(version, payload).map(Self::RADIO_STATUS)
32116            }
32117            RAW_IMU_DATA::ID => RAW_IMU_DATA::deser(version, payload).map(Self::RAW_IMU),
32118            RAW_PRESSURE_DATA::ID => {
32119                RAW_PRESSURE_DATA::deser(version, payload).map(Self::RAW_PRESSURE)
32120            }
32121            RAW_RPM_DATA::ID => RAW_RPM_DATA::deser(version, payload).map(Self::RAW_RPM),
32122            RC_CHANNELS_DATA::ID => {
32123                RC_CHANNELS_DATA::deser(version, payload).map(Self::RC_CHANNELS)
32124            }
32125            RC_CHANNELS_OVERRIDE_DATA::ID => {
32126                RC_CHANNELS_OVERRIDE_DATA::deser(version, payload).map(Self::RC_CHANNELS_OVERRIDE)
32127            }
32128            RC_CHANNELS_RAW_DATA::ID => {
32129                RC_CHANNELS_RAW_DATA::deser(version, payload).map(Self::RC_CHANNELS_RAW)
32130            }
32131            RC_CHANNELS_SCALED_DATA::ID => {
32132                RC_CHANNELS_SCALED_DATA::deser(version, payload).map(Self::RC_CHANNELS_SCALED)
32133            }
32134            REQUEST_DATA_STREAM_DATA::ID => {
32135                REQUEST_DATA_STREAM_DATA::deser(version, payload).map(Self::REQUEST_DATA_STREAM)
32136            }
32137            REQUEST_EVENT_DATA::ID => {
32138                REQUEST_EVENT_DATA::deser(version, payload).map(Self::REQUEST_EVENT)
32139            }
32140            RESOURCE_REQUEST_DATA::ID => {
32141                RESOURCE_REQUEST_DATA::deser(version, payload).map(Self::RESOURCE_REQUEST)
32142            }
32143            RESPONSE_EVENT_ERROR_DATA::ID => {
32144                RESPONSE_EVENT_ERROR_DATA::deser(version, payload).map(Self::RESPONSE_EVENT_ERROR)
32145            }
32146            SAFETY_ALLOWED_AREA_DATA::ID => {
32147                SAFETY_ALLOWED_AREA_DATA::deser(version, payload).map(Self::SAFETY_ALLOWED_AREA)
32148            }
32149            SAFETY_SET_ALLOWED_AREA_DATA::ID => {
32150                SAFETY_SET_ALLOWED_AREA_DATA::deser(version, payload)
32151                    .map(Self::SAFETY_SET_ALLOWED_AREA)
32152            }
32153            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::deser(version, payload).map(Self::SCALED_IMU),
32154            SCALED_IMU2_DATA::ID => {
32155                SCALED_IMU2_DATA::deser(version, payload).map(Self::SCALED_IMU2)
32156            }
32157            SCALED_IMU3_DATA::ID => {
32158                SCALED_IMU3_DATA::deser(version, payload).map(Self::SCALED_IMU3)
32159            }
32160            SCALED_PRESSURE_DATA::ID => {
32161                SCALED_PRESSURE_DATA::deser(version, payload).map(Self::SCALED_PRESSURE)
32162            }
32163            SCALED_PRESSURE2_DATA::ID => {
32164                SCALED_PRESSURE2_DATA::deser(version, payload).map(Self::SCALED_PRESSURE2)
32165            }
32166            SCALED_PRESSURE3_DATA::ID => {
32167                SCALED_PRESSURE3_DATA::deser(version, payload).map(Self::SCALED_PRESSURE3)
32168            }
32169            SERIAL_CONTROL_DATA::ID => {
32170                SERIAL_CONTROL_DATA::deser(version, payload).map(Self::SERIAL_CONTROL)
32171            }
32172            SERVO_OUTPUT_RAW_DATA::ID => {
32173                SERVO_OUTPUT_RAW_DATA::deser(version, payload).map(Self::SERVO_OUTPUT_RAW)
32174            }
32175            SETUP_SIGNING_DATA::ID => {
32176                SETUP_SIGNING_DATA::deser(version, payload).map(Self::SETUP_SIGNING)
32177            }
32178            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => {
32179                SET_ACTUATOR_CONTROL_TARGET_DATA::deser(version, payload)
32180                    .map(Self::SET_ACTUATOR_CONTROL_TARGET)
32181            }
32182            SET_ATTITUDE_TARGET_DATA::ID => {
32183                SET_ATTITUDE_TARGET_DATA::deser(version, payload).map(Self::SET_ATTITUDE_TARGET)
32184            }
32185            SET_GPS_GLOBAL_ORIGIN_DATA::ID => {
32186                SET_GPS_GLOBAL_ORIGIN_DATA::deser(version, payload).map(Self::SET_GPS_GLOBAL_ORIGIN)
32187            }
32188            SET_HOME_POSITION_DATA::ID => {
32189                SET_HOME_POSITION_DATA::deser(version, payload).map(Self::SET_HOME_POSITION)
32190            }
32191            SET_MODE_DATA::ID => SET_MODE_DATA::deser(version, payload).map(Self::SET_MODE),
32192            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
32193                SET_POSITION_TARGET_GLOBAL_INT_DATA::deser(version, payload)
32194                    .map(Self::SET_POSITION_TARGET_GLOBAL_INT)
32195            }
32196            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => {
32197                SET_POSITION_TARGET_LOCAL_NED_DATA::deser(version, payload)
32198                    .map(Self::SET_POSITION_TARGET_LOCAL_NED)
32199            }
32200            SIM_STATE_DATA::ID => SIM_STATE_DATA::deser(version, payload).map(Self::SIM_STATE),
32201            SMART_BATTERY_INFO_DATA::ID => {
32202                SMART_BATTERY_INFO_DATA::deser(version, payload).map(Self::SMART_BATTERY_INFO)
32203            }
32204            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::deser(version, payload).map(Self::STATUSTEXT),
32205            STORAGE_INFORMATION_DATA::ID => {
32206                STORAGE_INFORMATION_DATA::deser(version, payload).map(Self::STORAGE_INFORMATION)
32207            }
32208            SUPPORTED_TUNES_DATA::ID => {
32209                SUPPORTED_TUNES_DATA::deser(version, payload).map(Self::SUPPORTED_TUNES)
32210            }
32211            SYSTEM_TIME_DATA::ID => {
32212                SYSTEM_TIME_DATA::deser(version, payload).map(Self::SYSTEM_TIME)
32213            }
32214            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::deser(version, payload).map(Self::SYS_STATUS),
32215            TERRAIN_CHECK_DATA::ID => {
32216                TERRAIN_CHECK_DATA::deser(version, payload).map(Self::TERRAIN_CHECK)
32217            }
32218            TERRAIN_DATA_DATA::ID => {
32219                TERRAIN_DATA_DATA::deser(version, payload).map(Self::TERRAIN_DATA)
32220            }
32221            TERRAIN_REPORT_DATA::ID => {
32222                TERRAIN_REPORT_DATA::deser(version, payload).map(Self::TERRAIN_REPORT)
32223            }
32224            TERRAIN_REQUEST_DATA::ID => {
32225                TERRAIN_REQUEST_DATA::deser(version, payload).map(Self::TERRAIN_REQUEST)
32226            }
32227            TIMESYNC_DATA::ID => TIMESYNC_DATA::deser(version, payload).map(Self::TIMESYNC),
32228            TIME_ESTIMATE_TO_TARGET_DATA::ID => {
32229                TIME_ESTIMATE_TO_TARGET_DATA::deser(version, payload)
32230                    .map(Self::TIME_ESTIMATE_TO_TARGET)
32231            }
32232            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
32233                TRAJECTORY_REPRESENTATION_BEZIER_DATA::deser(version, payload)
32234                    .map(Self::TRAJECTORY_REPRESENTATION_BEZIER)
32235            }
32236            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
32237                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::deser(version, payload)
32238                    .map(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS)
32239            }
32240            TUNNEL_DATA::ID => TUNNEL_DATA::deser(version, payload).map(Self::TUNNEL),
32241            UALBERTA_SYS_STATUS_DATA::ID => {
32242                UALBERTA_SYS_STATUS_DATA::deser(version, payload).map(Self::UALBERTA_SYS_STATUS)
32243            }
32244            UAVCAN_NODE_INFO_DATA::ID => {
32245                UAVCAN_NODE_INFO_DATA::deser(version, payload).map(Self::UAVCAN_NODE_INFO)
32246            }
32247            UAVCAN_NODE_STATUS_DATA::ID => {
32248                UAVCAN_NODE_STATUS_DATA::deser(version, payload).map(Self::UAVCAN_NODE_STATUS)
32249            }
32250            UTM_GLOBAL_POSITION_DATA::ID => {
32251                UTM_GLOBAL_POSITION_DATA::deser(version, payload).map(Self::UTM_GLOBAL_POSITION)
32252            }
32253            V2_EXTENSION_DATA::ID => {
32254                V2_EXTENSION_DATA::deser(version, payload).map(Self::V2_EXTENSION)
32255            }
32256            VFR_HUD_DATA::ID => VFR_HUD_DATA::deser(version, payload).map(Self::VFR_HUD),
32257            VIBRATION_DATA::ID => VIBRATION_DATA::deser(version, payload).map(Self::VIBRATION),
32258            VICON_POSITION_ESTIMATE_DATA::ID => {
32259                VICON_POSITION_ESTIMATE_DATA::deser(version, payload)
32260                    .map(Self::VICON_POSITION_ESTIMATE)
32261            }
32262            VIDEO_STREAM_INFORMATION_DATA::ID => {
32263                VIDEO_STREAM_INFORMATION_DATA::deser(version, payload)
32264                    .map(Self::VIDEO_STREAM_INFORMATION)
32265            }
32266            VIDEO_STREAM_STATUS_DATA::ID => {
32267                VIDEO_STREAM_STATUS_DATA::deser(version, payload).map(Self::VIDEO_STREAM_STATUS)
32268            }
32269            VISION_POSITION_ESTIMATE_DATA::ID => {
32270                VISION_POSITION_ESTIMATE_DATA::deser(version, payload)
32271                    .map(Self::VISION_POSITION_ESTIMATE)
32272            }
32273            VISION_SPEED_ESTIMATE_DATA::ID => {
32274                VISION_SPEED_ESTIMATE_DATA::deser(version, payload).map(Self::VISION_SPEED_ESTIMATE)
32275            }
32276            WHEEL_DISTANCE_DATA::ID => {
32277                WHEEL_DISTANCE_DATA::deser(version, payload).map(Self::WHEEL_DISTANCE)
32278            }
32279            WIFI_CONFIG_AP_DATA::ID => {
32280                WIFI_CONFIG_AP_DATA::deser(version, payload).map(Self::WIFI_CONFIG_AP)
32281            }
32282            WINCH_STATUS_DATA::ID => {
32283                WINCH_STATUS_DATA::deser(version, payload).map(Self::WINCH_STATUS)
32284            }
32285            WIND_COV_DATA::ID => WIND_COV_DATA::deser(version, payload).map(Self::WIND_COV),
32286            _ => Err(::mavlink_core::error::ParserError::UnknownMessage { id }),
32287        }
32288    }
32289    fn message_name(&self) -> &'static str {
32290        match self {
32291            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::NAME,
32292            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::NAME,
32293            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::NAME,
32294            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::NAME,
32295            Self::ALTITUDE(..) => ALTITUDE_DATA::NAME,
32296            Self::ATTITUDE(..) => ATTITUDE_DATA::NAME,
32297            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::NAME,
32298            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::NAME,
32299            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::NAME,
32300            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::NAME,
32301            Self::AUTH_KEY(..) => AUTH_KEY_DATA::NAME,
32302            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32303                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME
32304            }
32305            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::NAME,
32306            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::NAME,
32307            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::NAME,
32308            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::NAME,
32309            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::NAME,
32310            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::NAME,
32311            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::NAME,
32312            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::NAME,
32313            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::NAME,
32314            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::NAME,
32315            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::NAME,
32316            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::NAME,
32317            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::NAME,
32318            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME,
32319            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::NAME,
32320            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::NAME,
32321            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::NAME,
32322            Self::CAN_FRAME(..) => CAN_FRAME_DATA::NAME,
32323            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::NAME,
32324            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::NAME,
32325            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::NAME,
32326            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME,
32327            Self::COLLISION(..) => COLLISION_DATA::NAME,
32328            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::NAME,
32329            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::NAME,
32330            Self::COMMAND_INT(..) => COMMAND_INT_DATA::NAME,
32331            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::NAME,
32332            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::NAME,
32333            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::NAME,
32334            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::NAME,
32335            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::NAME,
32336            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::NAME,
32337            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::NAME,
32338            Self::DATA_STREAM(..) => DATA_STREAM_DATA::NAME,
32339            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::NAME,
32340            Self::DEBUG(..) => DEBUG_DATA::NAME,
32341            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::NAME,
32342            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::NAME,
32343            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::NAME,
32344            Self::EFI_STATUS(..) => EFI_STATUS_DATA::NAME,
32345            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::NAME,
32346            Self::ESC_INFO(..) => ESC_INFO_DATA::NAME,
32347            Self::ESC_STATUS(..) => ESC_STATUS_DATA::NAME,
32348            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::NAME,
32349            Self::EVENT(..) => EVENT_DATA::NAME,
32350            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::NAME,
32351            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::NAME,
32352            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::NAME,
32353            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::NAME,
32354            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::NAME,
32355            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::NAME,
32356            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::NAME,
32357            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME,
32358            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::NAME,
32359            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME,
32360            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::NAME,
32361            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME,
32362            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32363                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME
32364            }
32365            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME,
32366            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::NAME,
32367            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::NAME,
32368            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::NAME,
32369            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME,
32370            Self::GPS2_RAW(..) => GPS2_RAW_DATA::NAME,
32371            Self::GPS2_RTK(..) => GPS2_RTK_DATA::NAME,
32372            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::NAME,
32373            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::NAME,
32374            Self::GPS_INPUT(..) => GPS_INPUT_DATA::NAME,
32375            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::NAME,
32376            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::NAME,
32377            Self::GPS_RTK(..) => GPS_RTK_DATA::NAME,
32378            Self::GPS_STATUS(..) => GPS_STATUS_DATA::NAME,
32379            Self::HEARTBEAT(..) => HEARTBEAT_DATA::NAME,
32380            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::NAME,
32381            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::NAME,
32382            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::NAME,
32383            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::NAME,
32384            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::NAME,
32385            Self::HIL_GPS(..) => HIL_GPS_DATA::NAME,
32386            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::NAME,
32387            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::NAME,
32388            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::NAME,
32389            Self::HIL_STATE(..) => HIL_STATE_DATA::NAME,
32390            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::NAME,
32391            Self::HOME_POSITION(..) => HOME_POSITION_DATA::NAME,
32392            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::NAME,
32393            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::NAME,
32394            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::NAME,
32395            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::NAME,
32396            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::NAME,
32397            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::NAME,
32398            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::NAME,
32399            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32400                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME
32401            }
32402            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::NAME,
32403            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::NAME,
32404            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::NAME,
32405            Self::LOG_DATA(..) => LOG_DATA_DATA::NAME,
32406            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::NAME,
32407            Self::LOG_ERASE(..) => LOG_ERASE_DATA::NAME,
32408            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::NAME,
32409            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::NAME,
32410            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::NAME,
32411            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::NAME,
32412            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::NAME,
32413            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::NAME,
32414            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::NAME,
32415            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::NAME,
32416            Self::MISSION_ACK(..) => MISSION_ACK_DATA::NAME,
32417            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::NAME,
32418            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::NAME,
32419            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::NAME,
32420            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::NAME,
32421            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::NAME,
32422            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::NAME,
32423            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::NAME,
32424            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::NAME,
32425            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::NAME,
32426            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::NAME,
32427            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::NAME,
32428            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::NAME,
32429            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::NAME,
32430            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::NAME,
32431            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::NAME,
32432            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::NAME,
32433            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::NAME,
32434            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::NAME,
32435            Self::ODOMETRY(..) => ODOMETRY_DATA::NAME,
32436            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::NAME,
32437            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::NAME,
32438            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME,
32439            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::NAME,
32440            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::NAME,
32441            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME,
32442            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME,
32443            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::NAME,
32444            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::NAME,
32445            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME,
32446            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::NAME,
32447            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::NAME,
32448            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::NAME,
32449            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::NAME,
32450            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::NAME,
32451            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::NAME,
32452            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::NAME,
32453            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::NAME,
32454            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::NAME,
32455            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::NAME,
32456            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::NAME,
32457            Self::PARAM_SET(..) => PARAM_SET_DATA::NAME,
32458            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::NAME,
32459            Self::PING(..) => PING_DATA::NAME,
32460            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::NAME,
32461            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::NAME,
32462            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32463            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::NAME,
32464            Self::POWER_STATUS(..) => POWER_STATUS_DATA::NAME,
32465            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::NAME,
32466            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::NAME,
32467            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::NAME,
32468            Self::RAW_IMU(..) => RAW_IMU_DATA::NAME,
32469            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::NAME,
32470            Self::RAW_RPM(..) => RAW_RPM_DATA::NAME,
32471            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::NAME,
32472            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::NAME,
32473            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::NAME,
32474            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::NAME,
32475            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::NAME,
32476            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::NAME,
32477            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::NAME,
32478            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::NAME,
32479            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::NAME,
32480            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::NAME,
32481            Self::SCALED_IMU(..) => SCALED_IMU_DATA::NAME,
32482            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::NAME,
32483            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::NAME,
32484            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::NAME,
32485            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::NAME,
32486            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::NAME,
32487            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::NAME,
32488            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::NAME,
32489            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::NAME,
32490            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::NAME,
32491            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::NAME,
32492            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::NAME,
32493            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::NAME,
32494            Self::SET_MODE(..) => SET_MODE_DATA::NAME,
32495            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME,
32496            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::NAME,
32497            Self::SIM_STATE(..) => SIM_STATE_DATA::NAME,
32498            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::NAME,
32499            Self::STATUSTEXT(..) => STATUSTEXT_DATA::NAME,
32500            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::NAME,
32501            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::NAME,
32502            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::NAME,
32503            Self::SYS_STATUS(..) => SYS_STATUS_DATA::NAME,
32504            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::NAME,
32505            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::NAME,
32506            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::NAME,
32507            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::NAME,
32508            Self::TIMESYNC(..) => TIMESYNC_DATA::NAME,
32509            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::NAME,
32510            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => {
32511                TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME
32512            }
32513            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32514                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME
32515            }
32516            Self::TUNNEL(..) => TUNNEL_DATA::NAME,
32517            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::NAME,
32518            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::NAME,
32519            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::NAME,
32520            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::NAME,
32521            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::NAME,
32522            Self::VFR_HUD(..) => VFR_HUD_DATA::NAME,
32523            Self::VIBRATION(..) => VIBRATION_DATA::NAME,
32524            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::NAME,
32525            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::NAME,
32526            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::NAME,
32527            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::NAME,
32528            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::NAME,
32529            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::NAME,
32530            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::NAME,
32531            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::NAME,
32532            Self::WIND_COV(..) => WIND_COV_DATA::NAME,
32533        }
32534    }
32535    fn message_id(&self) -> u32 {
32536        match self {
32537            Self::ACTUATOR_CONTROL_TARGET(..) => ACTUATOR_CONTROL_TARGET_DATA::ID,
32538            Self::ACTUATOR_OUTPUT_STATUS(..) => ACTUATOR_OUTPUT_STATUS_DATA::ID,
32539            Self::ADSB_VEHICLE(..) => ADSB_VEHICLE_DATA::ID,
32540            Self::AIS_VESSEL(..) => AIS_VESSEL_DATA::ID,
32541            Self::ALTITUDE(..) => ALTITUDE_DATA::ID,
32542            Self::ATTITUDE(..) => ATTITUDE_DATA::ID,
32543            Self::ATTITUDE_QUATERNION(..) => ATTITUDE_QUATERNION_DATA::ID,
32544            Self::ATTITUDE_QUATERNION_COV(..) => ATTITUDE_QUATERNION_COV_DATA::ID,
32545            Self::ATTITUDE_TARGET(..) => ATTITUDE_TARGET_DATA::ID,
32546            Self::ATT_POS_MOCAP(..) => ATT_POS_MOCAP_DATA::ID,
32547            Self::AUTH_KEY(..) => AUTH_KEY_DATA::ID,
32548            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(..) => {
32549                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID
32550            }
32551            Self::AUTOPILOT_VERSION(..) => AUTOPILOT_VERSION_DATA::ID,
32552            Self::AVAILABLE_MODES(..) => AVAILABLE_MODES_DATA::ID,
32553            Self::AVAILABLE_MODES_MONITOR(..) => AVAILABLE_MODES_MONITOR_DATA::ID,
32554            Self::BATTERY_INFO(..) => BATTERY_INFO_DATA::ID,
32555            Self::BATTERY_STATUS(..) => BATTERY_STATUS_DATA::ID,
32556            Self::BUTTON_CHANGE(..) => BUTTON_CHANGE_DATA::ID,
32557            Self::CAMERA_CAPTURE_STATUS(..) => CAMERA_CAPTURE_STATUS_DATA::ID,
32558            Self::CAMERA_FOV_STATUS(..) => CAMERA_FOV_STATUS_DATA::ID,
32559            Self::CAMERA_IMAGE_CAPTURED(..) => CAMERA_IMAGE_CAPTURED_DATA::ID,
32560            Self::CAMERA_INFORMATION(..) => CAMERA_INFORMATION_DATA::ID,
32561            Self::CAMERA_SETTINGS(..) => CAMERA_SETTINGS_DATA::ID,
32562            Self::CAMERA_THERMAL_RANGE(..) => CAMERA_THERMAL_RANGE_DATA::ID,
32563            Self::CAMERA_TRACKING_GEO_STATUS(..) => CAMERA_TRACKING_GEO_STATUS_DATA::ID,
32564            Self::CAMERA_TRACKING_IMAGE_STATUS(..) => CAMERA_TRACKING_IMAGE_STATUS_DATA::ID,
32565            Self::CAMERA_TRIGGER(..) => CAMERA_TRIGGER_DATA::ID,
32566            Self::CANFD_FRAME(..) => CANFD_FRAME_DATA::ID,
32567            Self::CAN_FILTER_MODIFY(..) => CAN_FILTER_MODIFY_DATA::ID,
32568            Self::CAN_FRAME(..) => CAN_FRAME_DATA::ID,
32569            Self::CELLULAR_CONFIG(..) => CELLULAR_CONFIG_DATA::ID,
32570            Self::CELLULAR_STATUS(..) => CELLULAR_STATUS_DATA::ID,
32571            Self::CHANGE_OPERATOR_CONTROL(..) => CHANGE_OPERATOR_CONTROL_DATA::ID,
32572            Self::CHANGE_OPERATOR_CONTROL_ACK(..) => CHANGE_OPERATOR_CONTROL_ACK_DATA::ID,
32573            Self::COLLISION(..) => COLLISION_DATA::ID,
32574            Self::COMMAND_ACK(..) => COMMAND_ACK_DATA::ID,
32575            Self::COMMAND_CANCEL(..) => COMMAND_CANCEL_DATA::ID,
32576            Self::COMMAND_INT(..) => COMMAND_INT_DATA::ID,
32577            Self::COMMAND_LONG(..) => COMMAND_LONG_DATA::ID,
32578            Self::COMPONENT_INFORMATION(..) => COMPONENT_INFORMATION_DATA::ID,
32579            Self::COMPONENT_INFORMATION_BASIC(..) => COMPONENT_INFORMATION_BASIC_DATA::ID,
32580            Self::COMPONENT_METADATA(..) => COMPONENT_METADATA_DATA::ID,
32581            Self::CONTROL_SYSTEM_STATE(..) => CONTROL_SYSTEM_STATE_DATA::ID,
32582            Self::CURRENT_EVENT_SEQUENCE(..) => CURRENT_EVENT_SEQUENCE_DATA::ID,
32583            Self::CURRENT_MODE(..) => CURRENT_MODE_DATA::ID,
32584            Self::DATA_STREAM(..) => DATA_STREAM_DATA::ID,
32585            Self::DATA_TRANSMISSION_HANDSHAKE(..) => DATA_TRANSMISSION_HANDSHAKE_DATA::ID,
32586            Self::DEBUG(..) => DEBUG_DATA::ID,
32587            Self::DEBUG_FLOAT_ARRAY(..) => DEBUG_FLOAT_ARRAY_DATA::ID,
32588            Self::DEBUG_VECT(..) => DEBUG_VECT_DATA::ID,
32589            Self::DISTANCE_SENSOR(..) => DISTANCE_SENSOR_DATA::ID,
32590            Self::EFI_STATUS(..) => EFI_STATUS_DATA::ID,
32591            Self::ENCAPSULATED_DATA(..) => ENCAPSULATED_DATA_DATA::ID,
32592            Self::ESC_INFO(..) => ESC_INFO_DATA::ID,
32593            Self::ESC_STATUS(..) => ESC_STATUS_DATA::ID,
32594            Self::ESTIMATOR_STATUS(..) => ESTIMATOR_STATUS_DATA::ID,
32595            Self::EVENT(..) => EVENT_DATA::ID,
32596            Self::EXTENDED_SYS_STATE(..) => EXTENDED_SYS_STATE_DATA::ID,
32597            Self::FENCE_STATUS(..) => FENCE_STATUS_DATA::ID,
32598            Self::FILE_TRANSFER_PROTOCOL(..) => FILE_TRANSFER_PROTOCOL_DATA::ID,
32599            Self::FLIGHT_INFORMATION(..) => FLIGHT_INFORMATION_DATA::ID,
32600            Self::FOLLOW_TARGET(..) => FOLLOW_TARGET_DATA::ID,
32601            Self::FUEL_STATUS(..) => FUEL_STATUS_DATA::ID,
32602            Self::GENERATOR_STATUS(..) => GENERATOR_STATUS_DATA::ID,
32603            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(..) => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID,
32604            Self::GIMBAL_DEVICE_INFORMATION(..) => GIMBAL_DEVICE_INFORMATION_DATA::ID,
32605            Self::GIMBAL_DEVICE_SET_ATTITUDE(..) => GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID,
32606            Self::GIMBAL_MANAGER_INFORMATION(..) => GIMBAL_MANAGER_INFORMATION_DATA::ID,
32607            Self::GIMBAL_MANAGER_SET_ATTITUDE(..) => GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID,
32608            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(..) => {
32609                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID
32610            }
32611            Self::GIMBAL_MANAGER_SET_PITCHYAW(..) => GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID,
32612            Self::GIMBAL_MANAGER_STATUS(..) => GIMBAL_MANAGER_STATUS_DATA::ID,
32613            Self::GLOBAL_POSITION_INT(..) => GLOBAL_POSITION_INT_DATA::ID,
32614            Self::GLOBAL_POSITION_INT_COV(..) => GLOBAL_POSITION_INT_COV_DATA::ID,
32615            Self::GLOBAL_VISION_POSITION_ESTIMATE(..) => GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID,
32616            Self::GPS2_RAW(..) => GPS2_RAW_DATA::ID,
32617            Self::GPS2_RTK(..) => GPS2_RTK_DATA::ID,
32618            Self::GPS_GLOBAL_ORIGIN(..) => GPS_GLOBAL_ORIGIN_DATA::ID,
32619            Self::GPS_INJECT_DATA(..) => GPS_INJECT_DATA_DATA::ID,
32620            Self::GPS_INPUT(..) => GPS_INPUT_DATA::ID,
32621            Self::GPS_RAW_INT(..) => GPS_RAW_INT_DATA::ID,
32622            Self::GPS_RTCM_DATA(..) => GPS_RTCM_DATA_DATA::ID,
32623            Self::GPS_RTK(..) => GPS_RTK_DATA::ID,
32624            Self::GPS_STATUS(..) => GPS_STATUS_DATA::ID,
32625            Self::HEARTBEAT(..) => HEARTBEAT_DATA::ID,
32626            Self::HIGHRES_IMU(..) => HIGHRES_IMU_DATA::ID,
32627            Self::HIGH_LATENCY(..) => HIGH_LATENCY_DATA::ID,
32628            Self::HIGH_LATENCY2(..) => HIGH_LATENCY2_DATA::ID,
32629            Self::HIL_ACTUATOR_CONTROLS(..) => HIL_ACTUATOR_CONTROLS_DATA::ID,
32630            Self::HIL_CONTROLS(..) => HIL_CONTROLS_DATA::ID,
32631            Self::HIL_GPS(..) => HIL_GPS_DATA::ID,
32632            Self::HIL_OPTICAL_FLOW(..) => HIL_OPTICAL_FLOW_DATA::ID,
32633            Self::HIL_RC_INPUTS_RAW(..) => HIL_RC_INPUTS_RAW_DATA::ID,
32634            Self::HIL_SENSOR(..) => HIL_SENSOR_DATA::ID,
32635            Self::HIL_STATE(..) => HIL_STATE_DATA::ID,
32636            Self::HIL_STATE_QUATERNION(..) => HIL_STATE_QUATERNION_DATA::ID,
32637            Self::HOME_POSITION(..) => HOME_POSITION_DATA::ID,
32638            Self::HYGROMETER_SENSOR(..) => HYGROMETER_SENSOR_DATA::ID,
32639            Self::ILLUMINATOR_STATUS(..) => ILLUMINATOR_STATUS_DATA::ID,
32640            Self::ISBD_LINK_STATUS(..) => ISBD_LINK_STATUS_DATA::ID,
32641            Self::LANDING_TARGET(..) => LANDING_TARGET_DATA::ID,
32642            Self::LINK_NODE_STATUS(..) => LINK_NODE_STATUS_DATA::ID,
32643            Self::LOCAL_POSITION_NED(..) => LOCAL_POSITION_NED_DATA::ID,
32644            Self::LOCAL_POSITION_NED_COV(..) => LOCAL_POSITION_NED_COV_DATA::ID,
32645            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(..) => {
32646                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID
32647            }
32648            Self::LOGGING_ACK(..) => LOGGING_ACK_DATA::ID,
32649            Self::LOGGING_DATA(..) => LOGGING_DATA_DATA::ID,
32650            Self::LOGGING_DATA_ACKED(..) => LOGGING_DATA_ACKED_DATA::ID,
32651            Self::LOG_DATA(..) => LOG_DATA_DATA::ID,
32652            Self::LOG_ENTRY(..) => LOG_ENTRY_DATA::ID,
32653            Self::LOG_ERASE(..) => LOG_ERASE_DATA::ID,
32654            Self::LOG_REQUEST_DATA(..) => LOG_REQUEST_DATA_DATA::ID,
32655            Self::LOG_REQUEST_END(..) => LOG_REQUEST_END_DATA::ID,
32656            Self::LOG_REQUEST_LIST(..) => LOG_REQUEST_LIST_DATA::ID,
32657            Self::MAG_CAL_REPORT(..) => MAG_CAL_REPORT_DATA::ID,
32658            Self::MANUAL_CONTROL(..) => MANUAL_CONTROL_DATA::ID,
32659            Self::MANUAL_SETPOINT(..) => MANUAL_SETPOINT_DATA::ID,
32660            Self::MEMORY_VECT(..) => MEMORY_VECT_DATA::ID,
32661            Self::MESSAGE_INTERVAL(..) => MESSAGE_INTERVAL_DATA::ID,
32662            Self::MISSION_ACK(..) => MISSION_ACK_DATA::ID,
32663            Self::MISSION_CLEAR_ALL(..) => MISSION_CLEAR_ALL_DATA::ID,
32664            Self::MISSION_COUNT(..) => MISSION_COUNT_DATA::ID,
32665            Self::MISSION_CURRENT(..) => MISSION_CURRENT_DATA::ID,
32666            Self::MISSION_ITEM(..) => MISSION_ITEM_DATA::ID,
32667            Self::MISSION_ITEM_INT(..) => MISSION_ITEM_INT_DATA::ID,
32668            Self::MISSION_ITEM_REACHED(..) => MISSION_ITEM_REACHED_DATA::ID,
32669            Self::MISSION_REQUEST(..) => MISSION_REQUEST_DATA::ID,
32670            Self::MISSION_REQUEST_INT(..) => MISSION_REQUEST_INT_DATA::ID,
32671            Self::MISSION_REQUEST_LIST(..) => MISSION_REQUEST_LIST_DATA::ID,
32672            Self::MISSION_REQUEST_PARTIAL_LIST(..) => MISSION_REQUEST_PARTIAL_LIST_DATA::ID,
32673            Self::MISSION_SET_CURRENT(..) => MISSION_SET_CURRENT_DATA::ID,
32674            Self::MISSION_WRITE_PARTIAL_LIST(..) => MISSION_WRITE_PARTIAL_LIST_DATA::ID,
32675            Self::MOUNT_ORIENTATION(..) => MOUNT_ORIENTATION_DATA::ID,
32676            Self::NAMED_VALUE_FLOAT(..) => NAMED_VALUE_FLOAT_DATA::ID,
32677            Self::NAMED_VALUE_INT(..) => NAMED_VALUE_INT_DATA::ID,
32678            Self::NAV_CONTROLLER_OUTPUT(..) => NAV_CONTROLLER_OUTPUT_DATA::ID,
32679            Self::NAV_FILTER_BIAS(..) => NAV_FILTER_BIAS_DATA::ID,
32680            Self::OBSTACLE_DISTANCE(..) => OBSTACLE_DISTANCE_DATA::ID,
32681            Self::ODOMETRY(..) => ODOMETRY_DATA::ID,
32682            Self::ONBOARD_COMPUTER_STATUS(..) => ONBOARD_COMPUTER_STATUS_DATA::ID,
32683            Self::OPEN_DRONE_ID_ARM_STATUS(..) => OPEN_DRONE_ID_ARM_STATUS_DATA::ID,
32684            Self::OPEN_DRONE_ID_AUTHENTICATION(..) => OPEN_DRONE_ID_AUTHENTICATION_DATA::ID,
32685            Self::OPEN_DRONE_ID_BASIC_ID(..) => OPEN_DRONE_ID_BASIC_ID_DATA::ID,
32686            Self::OPEN_DRONE_ID_LOCATION(..) => OPEN_DRONE_ID_LOCATION_DATA::ID,
32687            Self::OPEN_DRONE_ID_MESSAGE_PACK(..) => OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID,
32688            Self::OPEN_DRONE_ID_OPERATOR_ID(..) => OPEN_DRONE_ID_OPERATOR_ID_DATA::ID,
32689            Self::OPEN_DRONE_ID_SELF_ID(..) => OPEN_DRONE_ID_SELF_ID_DATA::ID,
32690            Self::OPEN_DRONE_ID_SYSTEM(..) => OPEN_DRONE_ID_SYSTEM_DATA::ID,
32691            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(..) => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID,
32692            Self::OPTICAL_FLOW(..) => OPTICAL_FLOW_DATA::ID,
32693            Self::OPTICAL_FLOW_RAD(..) => OPTICAL_FLOW_RAD_DATA::ID,
32694            Self::ORBIT_EXECUTION_STATUS(..) => ORBIT_EXECUTION_STATUS_DATA::ID,
32695            Self::PARAM_EXT_ACK(..) => PARAM_EXT_ACK_DATA::ID,
32696            Self::PARAM_EXT_REQUEST_LIST(..) => PARAM_EXT_REQUEST_LIST_DATA::ID,
32697            Self::PARAM_EXT_REQUEST_READ(..) => PARAM_EXT_REQUEST_READ_DATA::ID,
32698            Self::PARAM_EXT_SET(..) => PARAM_EXT_SET_DATA::ID,
32699            Self::PARAM_EXT_VALUE(..) => PARAM_EXT_VALUE_DATA::ID,
32700            Self::PARAM_MAP_RC(..) => PARAM_MAP_RC_DATA::ID,
32701            Self::PARAM_REQUEST_LIST(..) => PARAM_REQUEST_LIST_DATA::ID,
32702            Self::PARAM_REQUEST_READ(..) => PARAM_REQUEST_READ_DATA::ID,
32703            Self::PARAM_SET(..) => PARAM_SET_DATA::ID,
32704            Self::PARAM_VALUE(..) => PARAM_VALUE_DATA::ID,
32705            Self::PING(..) => PING_DATA::ID,
32706            Self::PLAY_TUNE(..) => PLAY_TUNE_DATA::ID,
32707            Self::PLAY_TUNE_V2(..) => PLAY_TUNE_V2_DATA::ID,
32708            Self::POSITION_TARGET_GLOBAL_INT(..) => POSITION_TARGET_GLOBAL_INT_DATA::ID,
32709            Self::POSITION_TARGET_LOCAL_NED(..) => POSITION_TARGET_LOCAL_NED_DATA::ID,
32710            Self::POWER_STATUS(..) => POWER_STATUS_DATA::ID,
32711            Self::PROTOCOL_VERSION(..) => PROTOCOL_VERSION_DATA::ID,
32712            Self::RADIO_CALIBRATION(..) => RADIO_CALIBRATION_DATA::ID,
32713            Self::RADIO_STATUS(..) => RADIO_STATUS_DATA::ID,
32714            Self::RAW_IMU(..) => RAW_IMU_DATA::ID,
32715            Self::RAW_PRESSURE(..) => RAW_PRESSURE_DATA::ID,
32716            Self::RAW_RPM(..) => RAW_RPM_DATA::ID,
32717            Self::RC_CHANNELS(..) => RC_CHANNELS_DATA::ID,
32718            Self::RC_CHANNELS_OVERRIDE(..) => RC_CHANNELS_OVERRIDE_DATA::ID,
32719            Self::RC_CHANNELS_RAW(..) => RC_CHANNELS_RAW_DATA::ID,
32720            Self::RC_CHANNELS_SCALED(..) => RC_CHANNELS_SCALED_DATA::ID,
32721            Self::REQUEST_DATA_STREAM(..) => REQUEST_DATA_STREAM_DATA::ID,
32722            Self::REQUEST_EVENT(..) => REQUEST_EVENT_DATA::ID,
32723            Self::RESOURCE_REQUEST(..) => RESOURCE_REQUEST_DATA::ID,
32724            Self::RESPONSE_EVENT_ERROR(..) => RESPONSE_EVENT_ERROR_DATA::ID,
32725            Self::SAFETY_ALLOWED_AREA(..) => SAFETY_ALLOWED_AREA_DATA::ID,
32726            Self::SAFETY_SET_ALLOWED_AREA(..) => SAFETY_SET_ALLOWED_AREA_DATA::ID,
32727            Self::SCALED_IMU(..) => SCALED_IMU_DATA::ID,
32728            Self::SCALED_IMU2(..) => SCALED_IMU2_DATA::ID,
32729            Self::SCALED_IMU3(..) => SCALED_IMU3_DATA::ID,
32730            Self::SCALED_PRESSURE(..) => SCALED_PRESSURE_DATA::ID,
32731            Self::SCALED_PRESSURE2(..) => SCALED_PRESSURE2_DATA::ID,
32732            Self::SCALED_PRESSURE3(..) => SCALED_PRESSURE3_DATA::ID,
32733            Self::SERIAL_CONTROL(..) => SERIAL_CONTROL_DATA::ID,
32734            Self::SERVO_OUTPUT_RAW(..) => SERVO_OUTPUT_RAW_DATA::ID,
32735            Self::SETUP_SIGNING(..) => SETUP_SIGNING_DATA::ID,
32736            Self::SET_ACTUATOR_CONTROL_TARGET(..) => SET_ACTUATOR_CONTROL_TARGET_DATA::ID,
32737            Self::SET_ATTITUDE_TARGET(..) => SET_ATTITUDE_TARGET_DATA::ID,
32738            Self::SET_GPS_GLOBAL_ORIGIN(..) => SET_GPS_GLOBAL_ORIGIN_DATA::ID,
32739            Self::SET_HOME_POSITION(..) => SET_HOME_POSITION_DATA::ID,
32740            Self::SET_MODE(..) => SET_MODE_DATA::ID,
32741            Self::SET_POSITION_TARGET_GLOBAL_INT(..) => SET_POSITION_TARGET_GLOBAL_INT_DATA::ID,
32742            Self::SET_POSITION_TARGET_LOCAL_NED(..) => SET_POSITION_TARGET_LOCAL_NED_DATA::ID,
32743            Self::SIM_STATE(..) => SIM_STATE_DATA::ID,
32744            Self::SMART_BATTERY_INFO(..) => SMART_BATTERY_INFO_DATA::ID,
32745            Self::STATUSTEXT(..) => STATUSTEXT_DATA::ID,
32746            Self::STORAGE_INFORMATION(..) => STORAGE_INFORMATION_DATA::ID,
32747            Self::SUPPORTED_TUNES(..) => SUPPORTED_TUNES_DATA::ID,
32748            Self::SYSTEM_TIME(..) => SYSTEM_TIME_DATA::ID,
32749            Self::SYS_STATUS(..) => SYS_STATUS_DATA::ID,
32750            Self::TERRAIN_CHECK(..) => TERRAIN_CHECK_DATA::ID,
32751            Self::TERRAIN_DATA(..) => TERRAIN_DATA_DATA::ID,
32752            Self::TERRAIN_REPORT(..) => TERRAIN_REPORT_DATA::ID,
32753            Self::TERRAIN_REQUEST(..) => TERRAIN_REQUEST_DATA::ID,
32754            Self::TIMESYNC(..) => TIMESYNC_DATA::ID,
32755            Self::TIME_ESTIMATE_TO_TARGET(..) => TIME_ESTIMATE_TO_TARGET_DATA::ID,
32756            Self::TRAJECTORY_REPRESENTATION_BEZIER(..) => TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID,
32757            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(..) => {
32758                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID
32759            }
32760            Self::TUNNEL(..) => TUNNEL_DATA::ID,
32761            Self::UALBERTA_SYS_STATUS(..) => UALBERTA_SYS_STATUS_DATA::ID,
32762            Self::UAVCAN_NODE_INFO(..) => UAVCAN_NODE_INFO_DATA::ID,
32763            Self::UAVCAN_NODE_STATUS(..) => UAVCAN_NODE_STATUS_DATA::ID,
32764            Self::UTM_GLOBAL_POSITION(..) => UTM_GLOBAL_POSITION_DATA::ID,
32765            Self::V2_EXTENSION(..) => V2_EXTENSION_DATA::ID,
32766            Self::VFR_HUD(..) => VFR_HUD_DATA::ID,
32767            Self::VIBRATION(..) => VIBRATION_DATA::ID,
32768            Self::VICON_POSITION_ESTIMATE(..) => VICON_POSITION_ESTIMATE_DATA::ID,
32769            Self::VIDEO_STREAM_INFORMATION(..) => VIDEO_STREAM_INFORMATION_DATA::ID,
32770            Self::VIDEO_STREAM_STATUS(..) => VIDEO_STREAM_STATUS_DATA::ID,
32771            Self::VISION_POSITION_ESTIMATE(..) => VISION_POSITION_ESTIMATE_DATA::ID,
32772            Self::VISION_SPEED_ESTIMATE(..) => VISION_SPEED_ESTIMATE_DATA::ID,
32773            Self::WHEEL_DISTANCE(..) => WHEEL_DISTANCE_DATA::ID,
32774            Self::WIFI_CONFIG_AP(..) => WIFI_CONFIG_AP_DATA::ID,
32775            Self::WINCH_STATUS(..) => WINCH_STATUS_DATA::ID,
32776            Self::WIND_COV(..) => WIND_COV_DATA::ID,
32777        }
32778    }
32779    fn message_id_from_name(name: &str) -> Option<u32> {
32780        match name {
32781            ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(ACTUATOR_CONTROL_TARGET_DATA::ID),
32782            ACTUATOR_OUTPUT_STATUS_DATA::NAME => Some(ACTUATOR_OUTPUT_STATUS_DATA::ID),
32783            ADSB_VEHICLE_DATA::NAME => Some(ADSB_VEHICLE_DATA::ID),
32784            AIS_VESSEL_DATA::NAME => Some(AIS_VESSEL_DATA::ID),
32785            ALTITUDE_DATA::NAME => Some(ALTITUDE_DATA::ID),
32786            ATTITUDE_DATA::NAME => Some(ATTITUDE_DATA::ID),
32787            ATTITUDE_QUATERNION_DATA::NAME => Some(ATTITUDE_QUATERNION_DATA::ID),
32788            ATTITUDE_QUATERNION_COV_DATA::NAME => Some(ATTITUDE_QUATERNION_COV_DATA::ID),
32789            ATTITUDE_TARGET_DATA::NAME => Some(ATTITUDE_TARGET_DATA::ID),
32790            ATT_POS_MOCAP_DATA::NAME => Some(ATT_POS_MOCAP_DATA::ID),
32791            AUTH_KEY_DATA::NAME => Some(AUTH_KEY_DATA::ID),
32792            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::NAME => {
32793                Some(AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID)
32794            }
32795            AUTOPILOT_VERSION_DATA::NAME => Some(AUTOPILOT_VERSION_DATA::ID),
32796            AVAILABLE_MODES_DATA::NAME => Some(AVAILABLE_MODES_DATA::ID),
32797            AVAILABLE_MODES_MONITOR_DATA::NAME => Some(AVAILABLE_MODES_MONITOR_DATA::ID),
32798            BATTERY_INFO_DATA::NAME => Some(BATTERY_INFO_DATA::ID),
32799            BATTERY_STATUS_DATA::NAME => Some(BATTERY_STATUS_DATA::ID),
32800            BUTTON_CHANGE_DATA::NAME => Some(BUTTON_CHANGE_DATA::ID),
32801            CAMERA_CAPTURE_STATUS_DATA::NAME => Some(CAMERA_CAPTURE_STATUS_DATA::ID),
32802            CAMERA_FOV_STATUS_DATA::NAME => Some(CAMERA_FOV_STATUS_DATA::ID),
32803            CAMERA_IMAGE_CAPTURED_DATA::NAME => Some(CAMERA_IMAGE_CAPTURED_DATA::ID),
32804            CAMERA_INFORMATION_DATA::NAME => Some(CAMERA_INFORMATION_DATA::ID),
32805            CAMERA_SETTINGS_DATA::NAME => Some(CAMERA_SETTINGS_DATA::ID),
32806            CAMERA_THERMAL_RANGE_DATA::NAME => Some(CAMERA_THERMAL_RANGE_DATA::ID),
32807            CAMERA_TRACKING_GEO_STATUS_DATA::NAME => Some(CAMERA_TRACKING_GEO_STATUS_DATA::ID),
32808            CAMERA_TRACKING_IMAGE_STATUS_DATA::NAME => Some(CAMERA_TRACKING_IMAGE_STATUS_DATA::ID),
32809            CAMERA_TRIGGER_DATA::NAME => Some(CAMERA_TRIGGER_DATA::ID),
32810            CANFD_FRAME_DATA::NAME => Some(CANFD_FRAME_DATA::ID),
32811            CAN_FILTER_MODIFY_DATA::NAME => Some(CAN_FILTER_MODIFY_DATA::ID),
32812            CAN_FRAME_DATA::NAME => Some(CAN_FRAME_DATA::ID),
32813            CELLULAR_CONFIG_DATA::NAME => Some(CELLULAR_CONFIG_DATA::ID),
32814            CELLULAR_STATUS_DATA::NAME => Some(CELLULAR_STATUS_DATA::ID),
32815            CHANGE_OPERATOR_CONTROL_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_DATA::ID),
32816            CHANGE_OPERATOR_CONTROL_ACK_DATA::NAME => Some(CHANGE_OPERATOR_CONTROL_ACK_DATA::ID),
32817            COLLISION_DATA::NAME => Some(COLLISION_DATA::ID),
32818            COMMAND_ACK_DATA::NAME => Some(COMMAND_ACK_DATA::ID),
32819            COMMAND_CANCEL_DATA::NAME => Some(COMMAND_CANCEL_DATA::ID),
32820            COMMAND_INT_DATA::NAME => Some(COMMAND_INT_DATA::ID),
32821            COMMAND_LONG_DATA::NAME => Some(COMMAND_LONG_DATA::ID),
32822            COMPONENT_INFORMATION_DATA::NAME => Some(COMPONENT_INFORMATION_DATA::ID),
32823            COMPONENT_INFORMATION_BASIC_DATA::NAME => Some(COMPONENT_INFORMATION_BASIC_DATA::ID),
32824            COMPONENT_METADATA_DATA::NAME => Some(COMPONENT_METADATA_DATA::ID),
32825            CONTROL_SYSTEM_STATE_DATA::NAME => Some(CONTROL_SYSTEM_STATE_DATA::ID),
32826            CURRENT_EVENT_SEQUENCE_DATA::NAME => Some(CURRENT_EVENT_SEQUENCE_DATA::ID),
32827            CURRENT_MODE_DATA::NAME => Some(CURRENT_MODE_DATA::ID),
32828            DATA_STREAM_DATA::NAME => Some(DATA_STREAM_DATA::ID),
32829            DATA_TRANSMISSION_HANDSHAKE_DATA::NAME => Some(DATA_TRANSMISSION_HANDSHAKE_DATA::ID),
32830            DEBUG_DATA::NAME => Some(DEBUG_DATA::ID),
32831            DEBUG_FLOAT_ARRAY_DATA::NAME => Some(DEBUG_FLOAT_ARRAY_DATA::ID),
32832            DEBUG_VECT_DATA::NAME => Some(DEBUG_VECT_DATA::ID),
32833            DISTANCE_SENSOR_DATA::NAME => Some(DISTANCE_SENSOR_DATA::ID),
32834            EFI_STATUS_DATA::NAME => Some(EFI_STATUS_DATA::ID),
32835            ENCAPSULATED_DATA_DATA::NAME => Some(ENCAPSULATED_DATA_DATA::ID),
32836            ESC_INFO_DATA::NAME => Some(ESC_INFO_DATA::ID),
32837            ESC_STATUS_DATA::NAME => Some(ESC_STATUS_DATA::ID),
32838            ESTIMATOR_STATUS_DATA::NAME => Some(ESTIMATOR_STATUS_DATA::ID),
32839            EVENT_DATA::NAME => Some(EVENT_DATA::ID),
32840            EXTENDED_SYS_STATE_DATA::NAME => Some(EXTENDED_SYS_STATE_DATA::ID),
32841            FENCE_STATUS_DATA::NAME => Some(FENCE_STATUS_DATA::ID),
32842            FILE_TRANSFER_PROTOCOL_DATA::NAME => Some(FILE_TRANSFER_PROTOCOL_DATA::ID),
32843            FLIGHT_INFORMATION_DATA::NAME => Some(FLIGHT_INFORMATION_DATA::ID),
32844            FOLLOW_TARGET_DATA::NAME => Some(FOLLOW_TARGET_DATA::ID),
32845            FUEL_STATUS_DATA::NAME => Some(FUEL_STATUS_DATA::ID),
32846            GENERATOR_STATUS_DATA::NAME => Some(GENERATOR_STATUS_DATA::ID),
32847            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::NAME => {
32848                Some(GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID)
32849            }
32850            GIMBAL_DEVICE_INFORMATION_DATA::NAME => Some(GIMBAL_DEVICE_INFORMATION_DATA::ID),
32851            GIMBAL_DEVICE_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID),
32852            GIMBAL_MANAGER_INFORMATION_DATA::NAME => Some(GIMBAL_MANAGER_INFORMATION_DATA::ID),
32853            GIMBAL_MANAGER_SET_ATTITUDE_DATA::NAME => Some(GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID),
32854            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::NAME => {
32855                Some(GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID)
32856            }
32857            GIMBAL_MANAGER_SET_PITCHYAW_DATA::NAME => Some(GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID),
32858            GIMBAL_MANAGER_STATUS_DATA::NAME => Some(GIMBAL_MANAGER_STATUS_DATA::ID),
32859            GLOBAL_POSITION_INT_DATA::NAME => Some(GLOBAL_POSITION_INT_DATA::ID),
32860            GLOBAL_POSITION_INT_COV_DATA::NAME => Some(GLOBAL_POSITION_INT_COV_DATA::ID),
32861            GLOBAL_VISION_POSITION_ESTIMATE_DATA::NAME => {
32862                Some(GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID)
32863            }
32864            GPS2_RAW_DATA::NAME => Some(GPS2_RAW_DATA::ID),
32865            GPS2_RTK_DATA::NAME => Some(GPS2_RTK_DATA::ID),
32866            GPS_GLOBAL_ORIGIN_DATA::NAME => Some(GPS_GLOBAL_ORIGIN_DATA::ID),
32867            GPS_INJECT_DATA_DATA::NAME => Some(GPS_INJECT_DATA_DATA::ID),
32868            GPS_INPUT_DATA::NAME => Some(GPS_INPUT_DATA::ID),
32869            GPS_RAW_INT_DATA::NAME => Some(GPS_RAW_INT_DATA::ID),
32870            GPS_RTCM_DATA_DATA::NAME => Some(GPS_RTCM_DATA_DATA::ID),
32871            GPS_RTK_DATA::NAME => Some(GPS_RTK_DATA::ID),
32872            GPS_STATUS_DATA::NAME => Some(GPS_STATUS_DATA::ID),
32873            HEARTBEAT_DATA::NAME => Some(HEARTBEAT_DATA::ID),
32874            HIGHRES_IMU_DATA::NAME => Some(HIGHRES_IMU_DATA::ID),
32875            HIGH_LATENCY_DATA::NAME => Some(HIGH_LATENCY_DATA::ID),
32876            HIGH_LATENCY2_DATA::NAME => Some(HIGH_LATENCY2_DATA::ID),
32877            HIL_ACTUATOR_CONTROLS_DATA::NAME => Some(HIL_ACTUATOR_CONTROLS_DATA::ID),
32878            HIL_CONTROLS_DATA::NAME => Some(HIL_CONTROLS_DATA::ID),
32879            HIL_GPS_DATA::NAME => Some(HIL_GPS_DATA::ID),
32880            HIL_OPTICAL_FLOW_DATA::NAME => Some(HIL_OPTICAL_FLOW_DATA::ID),
32881            HIL_RC_INPUTS_RAW_DATA::NAME => Some(HIL_RC_INPUTS_RAW_DATA::ID),
32882            HIL_SENSOR_DATA::NAME => Some(HIL_SENSOR_DATA::ID),
32883            HIL_STATE_DATA::NAME => Some(HIL_STATE_DATA::ID),
32884            HIL_STATE_QUATERNION_DATA::NAME => Some(HIL_STATE_QUATERNION_DATA::ID),
32885            HOME_POSITION_DATA::NAME => Some(HOME_POSITION_DATA::ID),
32886            HYGROMETER_SENSOR_DATA::NAME => Some(HYGROMETER_SENSOR_DATA::ID),
32887            ILLUMINATOR_STATUS_DATA::NAME => Some(ILLUMINATOR_STATUS_DATA::ID),
32888            ISBD_LINK_STATUS_DATA::NAME => Some(ISBD_LINK_STATUS_DATA::ID),
32889            LANDING_TARGET_DATA::NAME => Some(LANDING_TARGET_DATA::ID),
32890            LINK_NODE_STATUS_DATA::NAME => Some(LINK_NODE_STATUS_DATA::ID),
32891            LOCAL_POSITION_NED_DATA::NAME => Some(LOCAL_POSITION_NED_DATA::ID),
32892            LOCAL_POSITION_NED_COV_DATA::NAME => Some(LOCAL_POSITION_NED_COV_DATA::ID),
32893            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::NAME => {
32894                Some(LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID)
32895            }
32896            LOGGING_ACK_DATA::NAME => Some(LOGGING_ACK_DATA::ID),
32897            LOGGING_DATA_DATA::NAME => Some(LOGGING_DATA_DATA::ID),
32898            LOGGING_DATA_ACKED_DATA::NAME => Some(LOGGING_DATA_ACKED_DATA::ID),
32899            LOG_DATA_DATA::NAME => Some(LOG_DATA_DATA::ID),
32900            LOG_ENTRY_DATA::NAME => Some(LOG_ENTRY_DATA::ID),
32901            LOG_ERASE_DATA::NAME => Some(LOG_ERASE_DATA::ID),
32902            LOG_REQUEST_DATA_DATA::NAME => Some(LOG_REQUEST_DATA_DATA::ID),
32903            LOG_REQUEST_END_DATA::NAME => Some(LOG_REQUEST_END_DATA::ID),
32904            LOG_REQUEST_LIST_DATA::NAME => Some(LOG_REQUEST_LIST_DATA::ID),
32905            MAG_CAL_REPORT_DATA::NAME => Some(MAG_CAL_REPORT_DATA::ID),
32906            MANUAL_CONTROL_DATA::NAME => Some(MANUAL_CONTROL_DATA::ID),
32907            MANUAL_SETPOINT_DATA::NAME => Some(MANUAL_SETPOINT_DATA::ID),
32908            MEMORY_VECT_DATA::NAME => Some(MEMORY_VECT_DATA::ID),
32909            MESSAGE_INTERVAL_DATA::NAME => Some(MESSAGE_INTERVAL_DATA::ID),
32910            MISSION_ACK_DATA::NAME => Some(MISSION_ACK_DATA::ID),
32911            MISSION_CLEAR_ALL_DATA::NAME => Some(MISSION_CLEAR_ALL_DATA::ID),
32912            MISSION_COUNT_DATA::NAME => Some(MISSION_COUNT_DATA::ID),
32913            MISSION_CURRENT_DATA::NAME => Some(MISSION_CURRENT_DATA::ID),
32914            MISSION_ITEM_DATA::NAME => Some(MISSION_ITEM_DATA::ID),
32915            MISSION_ITEM_INT_DATA::NAME => Some(MISSION_ITEM_INT_DATA::ID),
32916            MISSION_ITEM_REACHED_DATA::NAME => Some(MISSION_ITEM_REACHED_DATA::ID),
32917            MISSION_REQUEST_DATA::NAME => Some(MISSION_REQUEST_DATA::ID),
32918            MISSION_REQUEST_INT_DATA::NAME => Some(MISSION_REQUEST_INT_DATA::ID),
32919            MISSION_REQUEST_LIST_DATA::NAME => Some(MISSION_REQUEST_LIST_DATA::ID),
32920            MISSION_REQUEST_PARTIAL_LIST_DATA::NAME => Some(MISSION_REQUEST_PARTIAL_LIST_DATA::ID),
32921            MISSION_SET_CURRENT_DATA::NAME => Some(MISSION_SET_CURRENT_DATA::ID),
32922            MISSION_WRITE_PARTIAL_LIST_DATA::NAME => Some(MISSION_WRITE_PARTIAL_LIST_DATA::ID),
32923            MOUNT_ORIENTATION_DATA::NAME => Some(MOUNT_ORIENTATION_DATA::ID),
32924            NAMED_VALUE_FLOAT_DATA::NAME => Some(NAMED_VALUE_FLOAT_DATA::ID),
32925            NAMED_VALUE_INT_DATA::NAME => Some(NAMED_VALUE_INT_DATA::ID),
32926            NAV_CONTROLLER_OUTPUT_DATA::NAME => Some(NAV_CONTROLLER_OUTPUT_DATA::ID),
32927            NAV_FILTER_BIAS_DATA::NAME => Some(NAV_FILTER_BIAS_DATA::ID),
32928            OBSTACLE_DISTANCE_DATA::NAME => Some(OBSTACLE_DISTANCE_DATA::ID),
32929            ODOMETRY_DATA::NAME => Some(ODOMETRY_DATA::ID),
32930            ONBOARD_COMPUTER_STATUS_DATA::NAME => Some(ONBOARD_COMPUTER_STATUS_DATA::ID),
32931            OPEN_DRONE_ID_ARM_STATUS_DATA::NAME => Some(OPEN_DRONE_ID_ARM_STATUS_DATA::ID),
32932            OPEN_DRONE_ID_AUTHENTICATION_DATA::NAME => Some(OPEN_DRONE_ID_AUTHENTICATION_DATA::ID),
32933            OPEN_DRONE_ID_BASIC_ID_DATA::NAME => Some(OPEN_DRONE_ID_BASIC_ID_DATA::ID),
32934            OPEN_DRONE_ID_LOCATION_DATA::NAME => Some(OPEN_DRONE_ID_LOCATION_DATA::ID),
32935            OPEN_DRONE_ID_MESSAGE_PACK_DATA::NAME => Some(OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID),
32936            OPEN_DRONE_ID_OPERATOR_ID_DATA::NAME => Some(OPEN_DRONE_ID_OPERATOR_ID_DATA::ID),
32937            OPEN_DRONE_ID_SELF_ID_DATA::NAME => Some(OPEN_DRONE_ID_SELF_ID_DATA::ID),
32938            OPEN_DRONE_ID_SYSTEM_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_DATA::ID),
32939            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::NAME => Some(OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID),
32940            OPTICAL_FLOW_DATA::NAME => Some(OPTICAL_FLOW_DATA::ID),
32941            OPTICAL_FLOW_RAD_DATA::NAME => Some(OPTICAL_FLOW_RAD_DATA::ID),
32942            ORBIT_EXECUTION_STATUS_DATA::NAME => Some(ORBIT_EXECUTION_STATUS_DATA::ID),
32943            PARAM_EXT_ACK_DATA::NAME => Some(PARAM_EXT_ACK_DATA::ID),
32944            PARAM_EXT_REQUEST_LIST_DATA::NAME => Some(PARAM_EXT_REQUEST_LIST_DATA::ID),
32945            PARAM_EXT_REQUEST_READ_DATA::NAME => Some(PARAM_EXT_REQUEST_READ_DATA::ID),
32946            PARAM_EXT_SET_DATA::NAME => Some(PARAM_EXT_SET_DATA::ID),
32947            PARAM_EXT_VALUE_DATA::NAME => Some(PARAM_EXT_VALUE_DATA::ID),
32948            PARAM_MAP_RC_DATA::NAME => Some(PARAM_MAP_RC_DATA::ID),
32949            PARAM_REQUEST_LIST_DATA::NAME => Some(PARAM_REQUEST_LIST_DATA::ID),
32950            PARAM_REQUEST_READ_DATA::NAME => Some(PARAM_REQUEST_READ_DATA::ID),
32951            PARAM_SET_DATA::NAME => Some(PARAM_SET_DATA::ID),
32952            PARAM_VALUE_DATA::NAME => Some(PARAM_VALUE_DATA::ID),
32953            PING_DATA::NAME => Some(PING_DATA::ID),
32954            PLAY_TUNE_DATA::NAME => Some(PLAY_TUNE_DATA::ID),
32955            PLAY_TUNE_V2_DATA::NAME => Some(PLAY_TUNE_V2_DATA::ID),
32956            POSITION_TARGET_GLOBAL_INT_DATA::NAME => Some(POSITION_TARGET_GLOBAL_INT_DATA::ID),
32957            POSITION_TARGET_LOCAL_NED_DATA::NAME => Some(POSITION_TARGET_LOCAL_NED_DATA::ID),
32958            POWER_STATUS_DATA::NAME => Some(POWER_STATUS_DATA::ID),
32959            PROTOCOL_VERSION_DATA::NAME => Some(PROTOCOL_VERSION_DATA::ID),
32960            RADIO_CALIBRATION_DATA::NAME => Some(RADIO_CALIBRATION_DATA::ID),
32961            RADIO_STATUS_DATA::NAME => Some(RADIO_STATUS_DATA::ID),
32962            RAW_IMU_DATA::NAME => Some(RAW_IMU_DATA::ID),
32963            RAW_PRESSURE_DATA::NAME => Some(RAW_PRESSURE_DATA::ID),
32964            RAW_RPM_DATA::NAME => Some(RAW_RPM_DATA::ID),
32965            RC_CHANNELS_DATA::NAME => Some(RC_CHANNELS_DATA::ID),
32966            RC_CHANNELS_OVERRIDE_DATA::NAME => Some(RC_CHANNELS_OVERRIDE_DATA::ID),
32967            RC_CHANNELS_RAW_DATA::NAME => Some(RC_CHANNELS_RAW_DATA::ID),
32968            RC_CHANNELS_SCALED_DATA::NAME => Some(RC_CHANNELS_SCALED_DATA::ID),
32969            REQUEST_DATA_STREAM_DATA::NAME => Some(REQUEST_DATA_STREAM_DATA::ID),
32970            REQUEST_EVENT_DATA::NAME => Some(REQUEST_EVENT_DATA::ID),
32971            RESOURCE_REQUEST_DATA::NAME => Some(RESOURCE_REQUEST_DATA::ID),
32972            RESPONSE_EVENT_ERROR_DATA::NAME => Some(RESPONSE_EVENT_ERROR_DATA::ID),
32973            SAFETY_ALLOWED_AREA_DATA::NAME => Some(SAFETY_ALLOWED_AREA_DATA::ID),
32974            SAFETY_SET_ALLOWED_AREA_DATA::NAME => Some(SAFETY_SET_ALLOWED_AREA_DATA::ID),
32975            SCALED_IMU_DATA::NAME => Some(SCALED_IMU_DATA::ID),
32976            SCALED_IMU2_DATA::NAME => Some(SCALED_IMU2_DATA::ID),
32977            SCALED_IMU3_DATA::NAME => Some(SCALED_IMU3_DATA::ID),
32978            SCALED_PRESSURE_DATA::NAME => Some(SCALED_PRESSURE_DATA::ID),
32979            SCALED_PRESSURE2_DATA::NAME => Some(SCALED_PRESSURE2_DATA::ID),
32980            SCALED_PRESSURE3_DATA::NAME => Some(SCALED_PRESSURE3_DATA::ID),
32981            SERIAL_CONTROL_DATA::NAME => Some(SERIAL_CONTROL_DATA::ID),
32982            SERVO_OUTPUT_RAW_DATA::NAME => Some(SERVO_OUTPUT_RAW_DATA::ID),
32983            SETUP_SIGNING_DATA::NAME => Some(SETUP_SIGNING_DATA::ID),
32984            SET_ACTUATOR_CONTROL_TARGET_DATA::NAME => Some(SET_ACTUATOR_CONTROL_TARGET_DATA::ID),
32985            SET_ATTITUDE_TARGET_DATA::NAME => Some(SET_ATTITUDE_TARGET_DATA::ID),
32986            SET_GPS_GLOBAL_ORIGIN_DATA::NAME => Some(SET_GPS_GLOBAL_ORIGIN_DATA::ID),
32987            SET_HOME_POSITION_DATA::NAME => Some(SET_HOME_POSITION_DATA::ID),
32988            SET_MODE_DATA::NAME => Some(SET_MODE_DATA::ID),
32989            SET_POSITION_TARGET_GLOBAL_INT_DATA::NAME => {
32990                Some(SET_POSITION_TARGET_GLOBAL_INT_DATA::ID)
32991            }
32992            SET_POSITION_TARGET_LOCAL_NED_DATA::NAME => {
32993                Some(SET_POSITION_TARGET_LOCAL_NED_DATA::ID)
32994            }
32995            SIM_STATE_DATA::NAME => Some(SIM_STATE_DATA::ID),
32996            SMART_BATTERY_INFO_DATA::NAME => Some(SMART_BATTERY_INFO_DATA::ID),
32997            STATUSTEXT_DATA::NAME => Some(STATUSTEXT_DATA::ID),
32998            STORAGE_INFORMATION_DATA::NAME => Some(STORAGE_INFORMATION_DATA::ID),
32999            SUPPORTED_TUNES_DATA::NAME => Some(SUPPORTED_TUNES_DATA::ID),
33000            SYSTEM_TIME_DATA::NAME => Some(SYSTEM_TIME_DATA::ID),
33001            SYS_STATUS_DATA::NAME => Some(SYS_STATUS_DATA::ID),
33002            TERRAIN_CHECK_DATA::NAME => Some(TERRAIN_CHECK_DATA::ID),
33003            TERRAIN_DATA_DATA::NAME => Some(TERRAIN_DATA_DATA::ID),
33004            TERRAIN_REPORT_DATA::NAME => Some(TERRAIN_REPORT_DATA::ID),
33005            TERRAIN_REQUEST_DATA::NAME => Some(TERRAIN_REQUEST_DATA::ID),
33006            TIMESYNC_DATA::NAME => Some(TIMESYNC_DATA::ID),
33007            TIME_ESTIMATE_TO_TARGET_DATA::NAME => Some(TIME_ESTIMATE_TO_TARGET_DATA::ID),
33008            TRAJECTORY_REPRESENTATION_BEZIER_DATA::NAME => {
33009                Some(TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID)
33010            }
33011            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::NAME => {
33012                Some(TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID)
33013            }
33014            TUNNEL_DATA::NAME => Some(TUNNEL_DATA::ID),
33015            UALBERTA_SYS_STATUS_DATA::NAME => Some(UALBERTA_SYS_STATUS_DATA::ID),
33016            UAVCAN_NODE_INFO_DATA::NAME => Some(UAVCAN_NODE_INFO_DATA::ID),
33017            UAVCAN_NODE_STATUS_DATA::NAME => Some(UAVCAN_NODE_STATUS_DATA::ID),
33018            UTM_GLOBAL_POSITION_DATA::NAME => Some(UTM_GLOBAL_POSITION_DATA::ID),
33019            V2_EXTENSION_DATA::NAME => Some(V2_EXTENSION_DATA::ID),
33020            VFR_HUD_DATA::NAME => Some(VFR_HUD_DATA::ID),
33021            VIBRATION_DATA::NAME => Some(VIBRATION_DATA::ID),
33022            VICON_POSITION_ESTIMATE_DATA::NAME => Some(VICON_POSITION_ESTIMATE_DATA::ID),
33023            VIDEO_STREAM_INFORMATION_DATA::NAME => Some(VIDEO_STREAM_INFORMATION_DATA::ID),
33024            VIDEO_STREAM_STATUS_DATA::NAME => Some(VIDEO_STREAM_STATUS_DATA::ID),
33025            VISION_POSITION_ESTIMATE_DATA::NAME => Some(VISION_POSITION_ESTIMATE_DATA::ID),
33026            VISION_SPEED_ESTIMATE_DATA::NAME => Some(VISION_SPEED_ESTIMATE_DATA::ID),
33027            WHEEL_DISTANCE_DATA::NAME => Some(WHEEL_DISTANCE_DATA::ID),
33028            WIFI_CONFIG_AP_DATA::NAME => Some(WIFI_CONFIG_AP_DATA::ID),
33029            WINCH_STATUS_DATA::NAME => Some(WINCH_STATUS_DATA::ID),
33030            WIND_COV_DATA::NAME => Some(WIND_COV_DATA::ID),
33031            _ => None,
33032        }
33033    }
33034    fn default_message_from_id(id: u32) -> Option<Self> {
33035        match id {
33036            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33037                ACTUATOR_CONTROL_TARGET_DATA::default(),
33038            )),
33039            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33040                ACTUATOR_OUTPUT_STATUS_DATA::default(),
33041            )),
33042            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::default())),
33043            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::default())),
33044            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::default())),
33045            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::default())),
33046            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33047                ATTITUDE_QUATERNION_DATA::default(),
33048            )),
33049            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33050                ATTITUDE_QUATERNION_COV_DATA::default(),
33051            )),
33052            ATTITUDE_TARGET_DATA::ID => {
33053                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::default()))
33054            }
33055            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::default())),
33056            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::default())),
33057            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33058                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33059                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::default(),
33060                ))
33061            }
33062            AUTOPILOT_VERSION_DATA::ID => {
33063                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::default()))
33064            }
33065            AVAILABLE_MODES_DATA::ID => {
33066                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::default()))
33067            }
33068            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33069                AVAILABLE_MODES_MONITOR_DATA::default(),
33070            )),
33071            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::default())),
33072            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::default())),
33073            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::default())),
33074            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33075                CAMERA_CAPTURE_STATUS_DATA::default(),
33076            )),
33077            CAMERA_FOV_STATUS_DATA::ID => {
33078                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::default()))
33079            }
33080            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33081                CAMERA_IMAGE_CAPTURED_DATA::default(),
33082            )),
33083            CAMERA_INFORMATION_DATA::ID => {
33084                Some(Self::CAMERA_INFORMATION(CAMERA_INFORMATION_DATA::default()))
33085            }
33086            CAMERA_SETTINGS_DATA::ID => {
33087                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::default()))
33088            }
33089            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33090                CAMERA_THERMAL_RANGE_DATA::default(),
33091            )),
33092            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33093                CAMERA_TRACKING_GEO_STATUS_DATA::default(),
33094            )),
33095            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33096                CAMERA_TRACKING_IMAGE_STATUS_DATA::default(),
33097            )),
33098            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::default())),
33099            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::default())),
33100            CAN_FILTER_MODIFY_DATA::ID => {
33101                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::default()))
33102            }
33103            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::default())),
33104            CELLULAR_CONFIG_DATA::ID => {
33105                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::default()))
33106            }
33107            CELLULAR_STATUS_DATA::ID => {
33108                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::default()))
33109            }
33110            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33111                CHANGE_OPERATOR_CONTROL_DATA::default(),
33112            )),
33113            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33114                CHANGE_OPERATOR_CONTROL_ACK_DATA::default(),
33115            )),
33116            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::default())),
33117            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::default())),
33118            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::default())),
33119            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::default())),
33120            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::default())),
33121            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33122                COMPONENT_INFORMATION_DATA::default(),
33123            )),
33124            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33125                COMPONENT_INFORMATION_BASIC_DATA::default(),
33126            )),
33127            COMPONENT_METADATA_DATA::ID => {
33128                Some(Self::COMPONENT_METADATA(COMPONENT_METADATA_DATA::default()))
33129            }
33130            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33131                CONTROL_SYSTEM_STATE_DATA::default(),
33132            )),
33133            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33134                CURRENT_EVENT_SEQUENCE_DATA::default(),
33135            )),
33136            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::default())),
33137            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::default())),
33138            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33139                DATA_TRANSMISSION_HANDSHAKE_DATA::default(),
33140            )),
33141            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::default())),
33142            DEBUG_FLOAT_ARRAY_DATA::ID => {
33143                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::default()))
33144            }
33145            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::default())),
33146            DISTANCE_SENSOR_DATA::ID => {
33147                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::default()))
33148            }
33149            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::default())),
33150            ENCAPSULATED_DATA_DATA::ID => {
33151                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::default()))
33152            }
33153            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::default())),
33154            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::default())),
33155            ESTIMATOR_STATUS_DATA::ID => {
33156                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::default()))
33157            }
33158            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::default())),
33159            EXTENDED_SYS_STATE_DATA::ID => {
33160                Some(Self::EXTENDED_SYS_STATE(EXTENDED_SYS_STATE_DATA::default()))
33161            }
33162            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::default())),
33163            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33164                FILE_TRANSFER_PROTOCOL_DATA::default(),
33165            )),
33166            FLIGHT_INFORMATION_DATA::ID => {
33167                Some(Self::FLIGHT_INFORMATION(FLIGHT_INFORMATION_DATA::default()))
33168            }
33169            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::default())),
33170            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::default())),
33171            GENERATOR_STATUS_DATA::ID => {
33172                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::default()))
33173            }
33174            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33175                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::default(),
33176            )),
33177            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33178                GIMBAL_DEVICE_INFORMATION_DATA::default(),
33179            )),
33180            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33181                GIMBAL_DEVICE_SET_ATTITUDE_DATA::default(),
33182            )),
33183            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33184                GIMBAL_MANAGER_INFORMATION_DATA::default(),
33185            )),
33186            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33187                GIMBAL_MANAGER_SET_ATTITUDE_DATA::default(),
33188            )),
33189            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33190                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33191                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::default(),
33192                ))
33193            }
33194            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33195                GIMBAL_MANAGER_SET_PITCHYAW_DATA::default(),
33196            )),
33197            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33198                GIMBAL_MANAGER_STATUS_DATA::default(),
33199            )),
33200            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33201                GLOBAL_POSITION_INT_DATA::default(),
33202            )),
33203            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33204                GLOBAL_POSITION_INT_COV_DATA::default(),
33205            )),
33206            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33207                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33208                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::default(),
33209                ))
33210            }
33211            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::default())),
33212            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::default())),
33213            GPS_GLOBAL_ORIGIN_DATA::ID => {
33214                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::default()))
33215            }
33216            GPS_INJECT_DATA_DATA::ID => {
33217                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::default()))
33218            }
33219            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::default())),
33220            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::default())),
33221            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::default())),
33222            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::default())),
33223            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::default())),
33224            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::default())),
33225            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::default())),
33226            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::default())),
33227            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::default())),
33228            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33229                HIL_ACTUATOR_CONTROLS_DATA::default(),
33230            )),
33231            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::default())),
33232            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::default())),
33233            HIL_OPTICAL_FLOW_DATA::ID => {
33234                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::default()))
33235            }
33236            HIL_RC_INPUTS_RAW_DATA::ID => {
33237                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::default()))
33238            }
33239            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::default())),
33240            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::default())),
33241            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33242                HIL_STATE_QUATERNION_DATA::default(),
33243            )),
33244            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::default())),
33245            HYGROMETER_SENSOR_DATA::ID => {
33246                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::default()))
33247            }
33248            ILLUMINATOR_STATUS_DATA::ID => {
33249                Some(Self::ILLUMINATOR_STATUS(ILLUMINATOR_STATUS_DATA::default()))
33250            }
33251            ISBD_LINK_STATUS_DATA::ID => {
33252                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::default()))
33253            }
33254            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::default())),
33255            LINK_NODE_STATUS_DATA::ID => {
33256                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::default()))
33257            }
33258            LOCAL_POSITION_NED_DATA::ID => {
33259                Some(Self::LOCAL_POSITION_NED(LOCAL_POSITION_NED_DATA::default()))
33260            }
33261            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33262                LOCAL_POSITION_NED_COV_DATA::default(),
33263            )),
33264            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33265                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33266                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::default(),
33267                ))
33268            }
33269            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::default())),
33270            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::default())),
33271            LOGGING_DATA_ACKED_DATA::ID => {
33272                Some(Self::LOGGING_DATA_ACKED(LOGGING_DATA_ACKED_DATA::default()))
33273            }
33274            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::default())),
33275            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::default())),
33276            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::default())),
33277            LOG_REQUEST_DATA_DATA::ID => {
33278                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::default()))
33279            }
33280            LOG_REQUEST_END_DATA::ID => {
33281                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::default()))
33282            }
33283            LOG_REQUEST_LIST_DATA::ID => {
33284                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::default()))
33285            }
33286            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::default())),
33287            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::default())),
33288            MANUAL_SETPOINT_DATA::ID => {
33289                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::default()))
33290            }
33291            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::default())),
33292            MESSAGE_INTERVAL_DATA::ID => {
33293                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::default()))
33294            }
33295            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::default())),
33296            MISSION_CLEAR_ALL_DATA::ID => {
33297                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::default()))
33298            }
33299            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::default())),
33300            MISSION_CURRENT_DATA::ID => {
33301                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::default()))
33302            }
33303            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::default())),
33304            MISSION_ITEM_INT_DATA::ID => {
33305                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::default()))
33306            }
33307            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33308                MISSION_ITEM_REACHED_DATA::default(),
33309            )),
33310            MISSION_REQUEST_DATA::ID => {
33311                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::default()))
33312            }
33313            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33314                MISSION_REQUEST_INT_DATA::default(),
33315            )),
33316            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33317                MISSION_REQUEST_LIST_DATA::default(),
33318            )),
33319            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33320                MISSION_REQUEST_PARTIAL_LIST_DATA::default(),
33321            )),
33322            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33323                MISSION_SET_CURRENT_DATA::default(),
33324            )),
33325            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33326                MISSION_WRITE_PARTIAL_LIST_DATA::default(),
33327            )),
33328            MOUNT_ORIENTATION_DATA::ID => {
33329                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::default()))
33330            }
33331            NAMED_VALUE_FLOAT_DATA::ID => {
33332                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::default()))
33333            }
33334            NAMED_VALUE_INT_DATA::ID => {
33335                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::default()))
33336            }
33337            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33338                NAV_CONTROLLER_OUTPUT_DATA::default(),
33339            )),
33340            NAV_FILTER_BIAS_DATA::ID => {
33341                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::default()))
33342            }
33343            OBSTACLE_DISTANCE_DATA::ID => {
33344                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::default()))
33345            }
33346            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::default())),
33347            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33348                ONBOARD_COMPUTER_STATUS_DATA::default(),
33349            )),
33350            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33351                OPEN_DRONE_ID_ARM_STATUS_DATA::default(),
33352            )),
33353            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33354                OPEN_DRONE_ID_AUTHENTICATION_DATA::default(),
33355            )),
33356            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33357                OPEN_DRONE_ID_BASIC_ID_DATA::default(),
33358            )),
33359            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33360                OPEN_DRONE_ID_LOCATION_DATA::default(),
33361            )),
33362            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33363                OPEN_DRONE_ID_MESSAGE_PACK_DATA::default(),
33364            )),
33365            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33366                OPEN_DRONE_ID_OPERATOR_ID_DATA::default(),
33367            )),
33368            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33369                OPEN_DRONE_ID_SELF_ID_DATA::default(),
33370            )),
33371            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33372                OPEN_DRONE_ID_SYSTEM_DATA::default(),
33373            )),
33374            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33375                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::default(),
33376            )),
33377            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::default())),
33378            OPTICAL_FLOW_RAD_DATA::ID => {
33379                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::default()))
33380            }
33381            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33382                ORBIT_EXECUTION_STATUS_DATA::default(),
33383            )),
33384            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::default())),
33385            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33386                PARAM_EXT_REQUEST_LIST_DATA::default(),
33387            )),
33388            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33389                PARAM_EXT_REQUEST_READ_DATA::default(),
33390            )),
33391            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::default())),
33392            PARAM_EXT_VALUE_DATA::ID => {
33393                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::default()))
33394            }
33395            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::default())),
33396            PARAM_REQUEST_LIST_DATA::ID => {
33397                Some(Self::PARAM_REQUEST_LIST(PARAM_REQUEST_LIST_DATA::default()))
33398            }
33399            PARAM_REQUEST_READ_DATA::ID => {
33400                Some(Self::PARAM_REQUEST_READ(PARAM_REQUEST_READ_DATA::default()))
33401            }
33402            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::default())),
33403            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::default())),
33404            PING_DATA::ID => Some(Self::PING(PING_DATA::default())),
33405            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::default())),
33406            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::default())),
33407            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33408                POSITION_TARGET_GLOBAL_INT_DATA::default(),
33409            )),
33410            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33411                POSITION_TARGET_LOCAL_NED_DATA::default(),
33412            )),
33413            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::default())),
33414            PROTOCOL_VERSION_DATA::ID => {
33415                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::default()))
33416            }
33417            RADIO_CALIBRATION_DATA::ID => {
33418                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::default()))
33419            }
33420            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::default())),
33421            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::default())),
33422            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::default())),
33423            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::default())),
33424            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::default())),
33425            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33426                RC_CHANNELS_OVERRIDE_DATA::default(),
33427            )),
33428            RC_CHANNELS_RAW_DATA::ID => {
33429                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::default()))
33430            }
33431            RC_CHANNELS_SCALED_DATA::ID => {
33432                Some(Self::RC_CHANNELS_SCALED(RC_CHANNELS_SCALED_DATA::default()))
33433            }
33434            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33435                REQUEST_DATA_STREAM_DATA::default(),
33436            )),
33437            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::default())),
33438            RESOURCE_REQUEST_DATA::ID => {
33439                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::default()))
33440            }
33441            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33442                RESPONSE_EVENT_ERROR_DATA::default(),
33443            )),
33444            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33445                SAFETY_ALLOWED_AREA_DATA::default(),
33446            )),
33447            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33448                SAFETY_SET_ALLOWED_AREA_DATA::default(),
33449            )),
33450            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::default())),
33451            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::default())),
33452            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::default())),
33453            SCALED_PRESSURE_DATA::ID => {
33454                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::default()))
33455            }
33456            SCALED_PRESSURE2_DATA::ID => {
33457                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::default()))
33458            }
33459            SCALED_PRESSURE3_DATA::ID => {
33460                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::default()))
33461            }
33462            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::default())),
33463            SERVO_OUTPUT_RAW_DATA::ID => {
33464                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::default()))
33465            }
33466            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::default())),
33467            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33468                SET_ACTUATOR_CONTROL_TARGET_DATA::default(),
33469            )),
33470            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33471                SET_ATTITUDE_TARGET_DATA::default(),
33472            )),
33473            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33474                SET_GPS_GLOBAL_ORIGIN_DATA::default(),
33475            )),
33476            SET_HOME_POSITION_DATA::ID => {
33477                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::default()))
33478            }
33479            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::default())),
33480            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
33481                SET_POSITION_TARGET_GLOBAL_INT_DATA::default(),
33482            )),
33483            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
33484                SET_POSITION_TARGET_LOCAL_NED_DATA::default(),
33485            )),
33486            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::default())),
33487            SMART_BATTERY_INFO_DATA::ID => {
33488                Some(Self::SMART_BATTERY_INFO(SMART_BATTERY_INFO_DATA::default()))
33489            }
33490            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::default())),
33491            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
33492                STORAGE_INFORMATION_DATA::default(),
33493            )),
33494            SUPPORTED_TUNES_DATA::ID => {
33495                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::default()))
33496            }
33497            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::default())),
33498            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::default())),
33499            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::default())),
33500            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::default())),
33501            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::default())),
33502            TERRAIN_REQUEST_DATA::ID => {
33503                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::default()))
33504            }
33505            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::default())),
33506            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
33507                TIME_ESTIMATE_TO_TARGET_DATA::default(),
33508            )),
33509            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
33510                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
33511                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::default(),
33512                ))
33513            }
33514            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
33515                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
33516                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::default(),
33517                ))
33518            }
33519            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::default())),
33520            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
33521                UALBERTA_SYS_STATUS_DATA::default(),
33522            )),
33523            UAVCAN_NODE_INFO_DATA::ID => {
33524                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::default()))
33525            }
33526            UAVCAN_NODE_STATUS_DATA::ID => {
33527                Some(Self::UAVCAN_NODE_STATUS(UAVCAN_NODE_STATUS_DATA::default()))
33528            }
33529            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
33530                UTM_GLOBAL_POSITION_DATA::default(),
33531            )),
33532            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::default())),
33533            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::default())),
33534            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::default())),
33535            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
33536                VICON_POSITION_ESTIMATE_DATA::default(),
33537            )),
33538            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
33539                VIDEO_STREAM_INFORMATION_DATA::default(),
33540            )),
33541            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
33542                VIDEO_STREAM_STATUS_DATA::default(),
33543            )),
33544            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
33545                VISION_POSITION_ESTIMATE_DATA::default(),
33546            )),
33547            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
33548                VISION_SPEED_ESTIMATE_DATA::default(),
33549            )),
33550            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::default())),
33551            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::default())),
33552            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::default())),
33553            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::default())),
33554            _ => None,
33555        }
33556    }
33557    #[cfg(feature = "arbitrary")]
33558    fn random_message_from_id<R: rand::RngCore>(id: u32, rng: &mut R) -> Option<Self> {
33559        match id {
33560            ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::ACTUATOR_CONTROL_TARGET(
33561                ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33562            )),
33563            ACTUATOR_OUTPUT_STATUS_DATA::ID => Some(Self::ACTUATOR_OUTPUT_STATUS(
33564                ACTUATOR_OUTPUT_STATUS_DATA::random(rng),
33565            )),
33566            ADSB_VEHICLE_DATA::ID => Some(Self::ADSB_VEHICLE(ADSB_VEHICLE_DATA::random(rng))),
33567            AIS_VESSEL_DATA::ID => Some(Self::AIS_VESSEL(AIS_VESSEL_DATA::random(rng))),
33568            ALTITUDE_DATA::ID => Some(Self::ALTITUDE(ALTITUDE_DATA::random(rng))),
33569            ATTITUDE_DATA::ID => Some(Self::ATTITUDE(ATTITUDE_DATA::random(rng))),
33570            ATTITUDE_QUATERNION_DATA::ID => Some(Self::ATTITUDE_QUATERNION(
33571                ATTITUDE_QUATERNION_DATA::random(rng),
33572            )),
33573            ATTITUDE_QUATERNION_COV_DATA::ID => Some(Self::ATTITUDE_QUATERNION_COV(
33574                ATTITUDE_QUATERNION_COV_DATA::random(rng),
33575            )),
33576            ATTITUDE_TARGET_DATA::ID => {
33577                Some(Self::ATTITUDE_TARGET(ATTITUDE_TARGET_DATA::random(rng)))
33578            }
33579            ATT_POS_MOCAP_DATA::ID => Some(Self::ATT_POS_MOCAP(ATT_POS_MOCAP_DATA::random(rng))),
33580            AUTH_KEY_DATA::ID => Some(Self::AUTH_KEY(AUTH_KEY_DATA::random(rng))),
33581            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
33582                Some(Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(
33583                    AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::random(rng),
33584                ))
33585            }
33586            AUTOPILOT_VERSION_DATA::ID => {
33587                Some(Self::AUTOPILOT_VERSION(AUTOPILOT_VERSION_DATA::random(rng)))
33588            }
33589            AVAILABLE_MODES_DATA::ID => {
33590                Some(Self::AVAILABLE_MODES(AVAILABLE_MODES_DATA::random(rng)))
33591            }
33592            AVAILABLE_MODES_MONITOR_DATA::ID => Some(Self::AVAILABLE_MODES_MONITOR(
33593                AVAILABLE_MODES_MONITOR_DATA::random(rng),
33594            )),
33595            BATTERY_INFO_DATA::ID => Some(Self::BATTERY_INFO(BATTERY_INFO_DATA::random(rng))),
33596            BATTERY_STATUS_DATA::ID => Some(Self::BATTERY_STATUS(BATTERY_STATUS_DATA::random(rng))),
33597            BUTTON_CHANGE_DATA::ID => Some(Self::BUTTON_CHANGE(BUTTON_CHANGE_DATA::random(rng))),
33598            CAMERA_CAPTURE_STATUS_DATA::ID => Some(Self::CAMERA_CAPTURE_STATUS(
33599                CAMERA_CAPTURE_STATUS_DATA::random(rng),
33600            )),
33601            CAMERA_FOV_STATUS_DATA::ID => {
33602                Some(Self::CAMERA_FOV_STATUS(CAMERA_FOV_STATUS_DATA::random(rng)))
33603            }
33604            CAMERA_IMAGE_CAPTURED_DATA::ID => Some(Self::CAMERA_IMAGE_CAPTURED(
33605                CAMERA_IMAGE_CAPTURED_DATA::random(rng),
33606            )),
33607            CAMERA_INFORMATION_DATA::ID => Some(Self::CAMERA_INFORMATION(
33608                CAMERA_INFORMATION_DATA::random(rng),
33609            )),
33610            CAMERA_SETTINGS_DATA::ID => {
33611                Some(Self::CAMERA_SETTINGS(CAMERA_SETTINGS_DATA::random(rng)))
33612            }
33613            CAMERA_THERMAL_RANGE_DATA::ID => Some(Self::CAMERA_THERMAL_RANGE(
33614                CAMERA_THERMAL_RANGE_DATA::random(rng),
33615            )),
33616            CAMERA_TRACKING_GEO_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_GEO_STATUS(
33617                CAMERA_TRACKING_GEO_STATUS_DATA::random(rng),
33618            )),
33619            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => Some(Self::CAMERA_TRACKING_IMAGE_STATUS(
33620                CAMERA_TRACKING_IMAGE_STATUS_DATA::random(rng),
33621            )),
33622            CAMERA_TRIGGER_DATA::ID => Some(Self::CAMERA_TRIGGER(CAMERA_TRIGGER_DATA::random(rng))),
33623            CANFD_FRAME_DATA::ID => Some(Self::CANFD_FRAME(CANFD_FRAME_DATA::random(rng))),
33624            CAN_FILTER_MODIFY_DATA::ID => {
33625                Some(Self::CAN_FILTER_MODIFY(CAN_FILTER_MODIFY_DATA::random(rng)))
33626            }
33627            CAN_FRAME_DATA::ID => Some(Self::CAN_FRAME(CAN_FRAME_DATA::random(rng))),
33628            CELLULAR_CONFIG_DATA::ID => {
33629                Some(Self::CELLULAR_CONFIG(CELLULAR_CONFIG_DATA::random(rng)))
33630            }
33631            CELLULAR_STATUS_DATA::ID => {
33632                Some(Self::CELLULAR_STATUS(CELLULAR_STATUS_DATA::random(rng)))
33633            }
33634            CHANGE_OPERATOR_CONTROL_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL(
33635                CHANGE_OPERATOR_CONTROL_DATA::random(rng),
33636            )),
33637            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => Some(Self::CHANGE_OPERATOR_CONTROL_ACK(
33638                CHANGE_OPERATOR_CONTROL_ACK_DATA::random(rng),
33639            )),
33640            COLLISION_DATA::ID => Some(Self::COLLISION(COLLISION_DATA::random(rng))),
33641            COMMAND_ACK_DATA::ID => Some(Self::COMMAND_ACK(COMMAND_ACK_DATA::random(rng))),
33642            COMMAND_CANCEL_DATA::ID => Some(Self::COMMAND_CANCEL(COMMAND_CANCEL_DATA::random(rng))),
33643            COMMAND_INT_DATA::ID => Some(Self::COMMAND_INT(COMMAND_INT_DATA::random(rng))),
33644            COMMAND_LONG_DATA::ID => Some(Self::COMMAND_LONG(COMMAND_LONG_DATA::random(rng))),
33645            COMPONENT_INFORMATION_DATA::ID => Some(Self::COMPONENT_INFORMATION(
33646                COMPONENT_INFORMATION_DATA::random(rng),
33647            )),
33648            COMPONENT_INFORMATION_BASIC_DATA::ID => Some(Self::COMPONENT_INFORMATION_BASIC(
33649                COMPONENT_INFORMATION_BASIC_DATA::random(rng),
33650            )),
33651            COMPONENT_METADATA_DATA::ID => Some(Self::COMPONENT_METADATA(
33652                COMPONENT_METADATA_DATA::random(rng),
33653            )),
33654            CONTROL_SYSTEM_STATE_DATA::ID => Some(Self::CONTROL_SYSTEM_STATE(
33655                CONTROL_SYSTEM_STATE_DATA::random(rng),
33656            )),
33657            CURRENT_EVENT_SEQUENCE_DATA::ID => Some(Self::CURRENT_EVENT_SEQUENCE(
33658                CURRENT_EVENT_SEQUENCE_DATA::random(rng),
33659            )),
33660            CURRENT_MODE_DATA::ID => Some(Self::CURRENT_MODE(CURRENT_MODE_DATA::random(rng))),
33661            DATA_STREAM_DATA::ID => Some(Self::DATA_STREAM(DATA_STREAM_DATA::random(rng))),
33662            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => Some(Self::DATA_TRANSMISSION_HANDSHAKE(
33663                DATA_TRANSMISSION_HANDSHAKE_DATA::random(rng),
33664            )),
33665            DEBUG_DATA::ID => Some(Self::DEBUG(DEBUG_DATA::random(rng))),
33666            DEBUG_FLOAT_ARRAY_DATA::ID => {
33667                Some(Self::DEBUG_FLOAT_ARRAY(DEBUG_FLOAT_ARRAY_DATA::random(rng)))
33668            }
33669            DEBUG_VECT_DATA::ID => Some(Self::DEBUG_VECT(DEBUG_VECT_DATA::random(rng))),
33670            DISTANCE_SENSOR_DATA::ID => {
33671                Some(Self::DISTANCE_SENSOR(DISTANCE_SENSOR_DATA::random(rng)))
33672            }
33673            EFI_STATUS_DATA::ID => Some(Self::EFI_STATUS(EFI_STATUS_DATA::random(rng))),
33674            ENCAPSULATED_DATA_DATA::ID => {
33675                Some(Self::ENCAPSULATED_DATA(ENCAPSULATED_DATA_DATA::random(rng)))
33676            }
33677            ESC_INFO_DATA::ID => Some(Self::ESC_INFO(ESC_INFO_DATA::random(rng))),
33678            ESC_STATUS_DATA::ID => Some(Self::ESC_STATUS(ESC_STATUS_DATA::random(rng))),
33679            ESTIMATOR_STATUS_DATA::ID => {
33680                Some(Self::ESTIMATOR_STATUS(ESTIMATOR_STATUS_DATA::random(rng)))
33681            }
33682            EVENT_DATA::ID => Some(Self::EVENT(EVENT_DATA::random(rng))),
33683            EXTENDED_SYS_STATE_DATA::ID => Some(Self::EXTENDED_SYS_STATE(
33684                EXTENDED_SYS_STATE_DATA::random(rng),
33685            )),
33686            FENCE_STATUS_DATA::ID => Some(Self::FENCE_STATUS(FENCE_STATUS_DATA::random(rng))),
33687            FILE_TRANSFER_PROTOCOL_DATA::ID => Some(Self::FILE_TRANSFER_PROTOCOL(
33688                FILE_TRANSFER_PROTOCOL_DATA::random(rng),
33689            )),
33690            FLIGHT_INFORMATION_DATA::ID => Some(Self::FLIGHT_INFORMATION(
33691                FLIGHT_INFORMATION_DATA::random(rng),
33692            )),
33693            FOLLOW_TARGET_DATA::ID => Some(Self::FOLLOW_TARGET(FOLLOW_TARGET_DATA::random(rng))),
33694            FUEL_STATUS_DATA::ID => Some(Self::FUEL_STATUS(FUEL_STATUS_DATA::random(rng))),
33695            GENERATOR_STATUS_DATA::ID => {
33696                Some(Self::GENERATOR_STATUS(GENERATOR_STATUS_DATA::random(rng)))
33697            }
33698            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => Some(Self::GIMBAL_DEVICE_ATTITUDE_STATUS(
33699                GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::random(rng),
33700            )),
33701            GIMBAL_DEVICE_INFORMATION_DATA::ID => Some(Self::GIMBAL_DEVICE_INFORMATION(
33702                GIMBAL_DEVICE_INFORMATION_DATA::random(rng),
33703            )),
33704            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_DEVICE_SET_ATTITUDE(
33705                GIMBAL_DEVICE_SET_ATTITUDE_DATA::random(rng),
33706            )),
33707            GIMBAL_MANAGER_INFORMATION_DATA::ID => Some(Self::GIMBAL_MANAGER_INFORMATION(
33708                GIMBAL_MANAGER_INFORMATION_DATA::random(rng),
33709            )),
33710            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_ATTITUDE(
33711                GIMBAL_MANAGER_SET_ATTITUDE_DATA::random(rng),
33712            )),
33713            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
33714                Some(Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(
33715                    GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::random(rng),
33716                ))
33717            }
33718            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => Some(Self::GIMBAL_MANAGER_SET_PITCHYAW(
33719                GIMBAL_MANAGER_SET_PITCHYAW_DATA::random(rng),
33720            )),
33721            GIMBAL_MANAGER_STATUS_DATA::ID => Some(Self::GIMBAL_MANAGER_STATUS(
33722                GIMBAL_MANAGER_STATUS_DATA::random(rng),
33723            )),
33724            GLOBAL_POSITION_INT_DATA::ID => Some(Self::GLOBAL_POSITION_INT(
33725                GLOBAL_POSITION_INT_DATA::random(rng),
33726            )),
33727            GLOBAL_POSITION_INT_COV_DATA::ID => Some(Self::GLOBAL_POSITION_INT_COV(
33728                GLOBAL_POSITION_INT_COV_DATA::random(rng),
33729            )),
33730            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
33731                Some(Self::GLOBAL_VISION_POSITION_ESTIMATE(
33732                    GLOBAL_VISION_POSITION_ESTIMATE_DATA::random(rng),
33733                ))
33734            }
33735            GPS2_RAW_DATA::ID => Some(Self::GPS2_RAW(GPS2_RAW_DATA::random(rng))),
33736            GPS2_RTK_DATA::ID => Some(Self::GPS2_RTK(GPS2_RTK_DATA::random(rng))),
33737            GPS_GLOBAL_ORIGIN_DATA::ID => {
33738                Some(Self::GPS_GLOBAL_ORIGIN(GPS_GLOBAL_ORIGIN_DATA::random(rng)))
33739            }
33740            GPS_INJECT_DATA_DATA::ID => {
33741                Some(Self::GPS_INJECT_DATA(GPS_INJECT_DATA_DATA::random(rng)))
33742            }
33743            GPS_INPUT_DATA::ID => Some(Self::GPS_INPUT(GPS_INPUT_DATA::random(rng))),
33744            GPS_RAW_INT_DATA::ID => Some(Self::GPS_RAW_INT(GPS_RAW_INT_DATA::random(rng))),
33745            GPS_RTCM_DATA_DATA::ID => Some(Self::GPS_RTCM_DATA(GPS_RTCM_DATA_DATA::random(rng))),
33746            GPS_RTK_DATA::ID => Some(Self::GPS_RTK(GPS_RTK_DATA::random(rng))),
33747            GPS_STATUS_DATA::ID => Some(Self::GPS_STATUS(GPS_STATUS_DATA::random(rng))),
33748            HEARTBEAT_DATA::ID => Some(Self::HEARTBEAT(HEARTBEAT_DATA::random(rng))),
33749            HIGHRES_IMU_DATA::ID => Some(Self::HIGHRES_IMU(HIGHRES_IMU_DATA::random(rng))),
33750            HIGH_LATENCY_DATA::ID => Some(Self::HIGH_LATENCY(HIGH_LATENCY_DATA::random(rng))),
33751            HIGH_LATENCY2_DATA::ID => Some(Self::HIGH_LATENCY2(HIGH_LATENCY2_DATA::random(rng))),
33752            HIL_ACTUATOR_CONTROLS_DATA::ID => Some(Self::HIL_ACTUATOR_CONTROLS(
33753                HIL_ACTUATOR_CONTROLS_DATA::random(rng),
33754            )),
33755            HIL_CONTROLS_DATA::ID => Some(Self::HIL_CONTROLS(HIL_CONTROLS_DATA::random(rng))),
33756            HIL_GPS_DATA::ID => Some(Self::HIL_GPS(HIL_GPS_DATA::random(rng))),
33757            HIL_OPTICAL_FLOW_DATA::ID => {
33758                Some(Self::HIL_OPTICAL_FLOW(HIL_OPTICAL_FLOW_DATA::random(rng)))
33759            }
33760            HIL_RC_INPUTS_RAW_DATA::ID => {
33761                Some(Self::HIL_RC_INPUTS_RAW(HIL_RC_INPUTS_RAW_DATA::random(rng)))
33762            }
33763            HIL_SENSOR_DATA::ID => Some(Self::HIL_SENSOR(HIL_SENSOR_DATA::random(rng))),
33764            HIL_STATE_DATA::ID => Some(Self::HIL_STATE(HIL_STATE_DATA::random(rng))),
33765            HIL_STATE_QUATERNION_DATA::ID => Some(Self::HIL_STATE_QUATERNION(
33766                HIL_STATE_QUATERNION_DATA::random(rng),
33767            )),
33768            HOME_POSITION_DATA::ID => Some(Self::HOME_POSITION(HOME_POSITION_DATA::random(rng))),
33769            HYGROMETER_SENSOR_DATA::ID => {
33770                Some(Self::HYGROMETER_SENSOR(HYGROMETER_SENSOR_DATA::random(rng)))
33771            }
33772            ILLUMINATOR_STATUS_DATA::ID => Some(Self::ILLUMINATOR_STATUS(
33773                ILLUMINATOR_STATUS_DATA::random(rng),
33774            )),
33775            ISBD_LINK_STATUS_DATA::ID => {
33776                Some(Self::ISBD_LINK_STATUS(ISBD_LINK_STATUS_DATA::random(rng)))
33777            }
33778            LANDING_TARGET_DATA::ID => Some(Self::LANDING_TARGET(LANDING_TARGET_DATA::random(rng))),
33779            LINK_NODE_STATUS_DATA::ID => {
33780                Some(Self::LINK_NODE_STATUS(LINK_NODE_STATUS_DATA::random(rng)))
33781            }
33782            LOCAL_POSITION_NED_DATA::ID => Some(Self::LOCAL_POSITION_NED(
33783                LOCAL_POSITION_NED_DATA::random(rng),
33784            )),
33785            LOCAL_POSITION_NED_COV_DATA::ID => Some(Self::LOCAL_POSITION_NED_COV(
33786                LOCAL_POSITION_NED_COV_DATA::random(rng),
33787            )),
33788            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
33789                Some(Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(
33790                    LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::random(rng),
33791                ))
33792            }
33793            LOGGING_ACK_DATA::ID => Some(Self::LOGGING_ACK(LOGGING_ACK_DATA::random(rng))),
33794            LOGGING_DATA_DATA::ID => Some(Self::LOGGING_DATA(LOGGING_DATA_DATA::random(rng))),
33795            LOGGING_DATA_ACKED_DATA::ID => Some(Self::LOGGING_DATA_ACKED(
33796                LOGGING_DATA_ACKED_DATA::random(rng),
33797            )),
33798            LOG_DATA_DATA::ID => Some(Self::LOG_DATA(LOG_DATA_DATA::random(rng))),
33799            LOG_ENTRY_DATA::ID => Some(Self::LOG_ENTRY(LOG_ENTRY_DATA::random(rng))),
33800            LOG_ERASE_DATA::ID => Some(Self::LOG_ERASE(LOG_ERASE_DATA::random(rng))),
33801            LOG_REQUEST_DATA_DATA::ID => {
33802                Some(Self::LOG_REQUEST_DATA(LOG_REQUEST_DATA_DATA::random(rng)))
33803            }
33804            LOG_REQUEST_END_DATA::ID => {
33805                Some(Self::LOG_REQUEST_END(LOG_REQUEST_END_DATA::random(rng)))
33806            }
33807            LOG_REQUEST_LIST_DATA::ID => {
33808                Some(Self::LOG_REQUEST_LIST(LOG_REQUEST_LIST_DATA::random(rng)))
33809            }
33810            MAG_CAL_REPORT_DATA::ID => Some(Self::MAG_CAL_REPORT(MAG_CAL_REPORT_DATA::random(rng))),
33811            MANUAL_CONTROL_DATA::ID => Some(Self::MANUAL_CONTROL(MANUAL_CONTROL_DATA::random(rng))),
33812            MANUAL_SETPOINT_DATA::ID => {
33813                Some(Self::MANUAL_SETPOINT(MANUAL_SETPOINT_DATA::random(rng)))
33814            }
33815            MEMORY_VECT_DATA::ID => Some(Self::MEMORY_VECT(MEMORY_VECT_DATA::random(rng))),
33816            MESSAGE_INTERVAL_DATA::ID => {
33817                Some(Self::MESSAGE_INTERVAL(MESSAGE_INTERVAL_DATA::random(rng)))
33818            }
33819            MISSION_ACK_DATA::ID => Some(Self::MISSION_ACK(MISSION_ACK_DATA::random(rng))),
33820            MISSION_CLEAR_ALL_DATA::ID => {
33821                Some(Self::MISSION_CLEAR_ALL(MISSION_CLEAR_ALL_DATA::random(rng)))
33822            }
33823            MISSION_COUNT_DATA::ID => Some(Self::MISSION_COUNT(MISSION_COUNT_DATA::random(rng))),
33824            MISSION_CURRENT_DATA::ID => {
33825                Some(Self::MISSION_CURRENT(MISSION_CURRENT_DATA::random(rng)))
33826            }
33827            MISSION_ITEM_DATA::ID => Some(Self::MISSION_ITEM(MISSION_ITEM_DATA::random(rng))),
33828            MISSION_ITEM_INT_DATA::ID => {
33829                Some(Self::MISSION_ITEM_INT(MISSION_ITEM_INT_DATA::random(rng)))
33830            }
33831            MISSION_ITEM_REACHED_DATA::ID => Some(Self::MISSION_ITEM_REACHED(
33832                MISSION_ITEM_REACHED_DATA::random(rng),
33833            )),
33834            MISSION_REQUEST_DATA::ID => {
33835                Some(Self::MISSION_REQUEST(MISSION_REQUEST_DATA::random(rng)))
33836            }
33837            MISSION_REQUEST_INT_DATA::ID => Some(Self::MISSION_REQUEST_INT(
33838                MISSION_REQUEST_INT_DATA::random(rng),
33839            )),
33840            MISSION_REQUEST_LIST_DATA::ID => Some(Self::MISSION_REQUEST_LIST(
33841                MISSION_REQUEST_LIST_DATA::random(rng),
33842            )),
33843            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_REQUEST_PARTIAL_LIST(
33844                MISSION_REQUEST_PARTIAL_LIST_DATA::random(rng),
33845            )),
33846            MISSION_SET_CURRENT_DATA::ID => Some(Self::MISSION_SET_CURRENT(
33847                MISSION_SET_CURRENT_DATA::random(rng),
33848            )),
33849            MISSION_WRITE_PARTIAL_LIST_DATA::ID => Some(Self::MISSION_WRITE_PARTIAL_LIST(
33850                MISSION_WRITE_PARTIAL_LIST_DATA::random(rng),
33851            )),
33852            MOUNT_ORIENTATION_DATA::ID => {
33853                Some(Self::MOUNT_ORIENTATION(MOUNT_ORIENTATION_DATA::random(rng)))
33854            }
33855            NAMED_VALUE_FLOAT_DATA::ID => {
33856                Some(Self::NAMED_VALUE_FLOAT(NAMED_VALUE_FLOAT_DATA::random(rng)))
33857            }
33858            NAMED_VALUE_INT_DATA::ID => {
33859                Some(Self::NAMED_VALUE_INT(NAMED_VALUE_INT_DATA::random(rng)))
33860            }
33861            NAV_CONTROLLER_OUTPUT_DATA::ID => Some(Self::NAV_CONTROLLER_OUTPUT(
33862                NAV_CONTROLLER_OUTPUT_DATA::random(rng),
33863            )),
33864            NAV_FILTER_BIAS_DATA::ID => {
33865                Some(Self::NAV_FILTER_BIAS(NAV_FILTER_BIAS_DATA::random(rng)))
33866            }
33867            OBSTACLE_DISTANCE_DATA::ID => {
33868                Some(Self::OBSTACLE_DISTANCE(OBSTACLE_DISTANCE_DATA::random(rng)))
33869            }
33870            ODOMETRY_DATA::ID => Some(Self::ODOMETRY(ODOMETRY_DATA::random(rng))),
33871            ONBOARD_COMPUTER_STATUS_DATA::ID => Some(Self::ONBOARD_COMPUTER_STATUS(
33872                ONBOARD_COMPUTER_STATUS_DATA::random(rng),
33873            )),
33874            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => Some(Self::OPEN_DRONE_ID_ARM_STATUS(
33875                OPEN_DRONE_ID_ARM_STATUS_DATA::random(rng),
33876            )),
33877            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => Some(Self::OPEN_DRONE_ID_AUTHENTICATION(
33878                OPEN_DRONE_ID_AUTHENTICATION_DATA::random(rng),
33879            )),
33880            OPEN_DRONE_ID_BASIC_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_BASIC_ID(
33881                OPEN_DRONE_ID_BASIC_ID_DATA::random(rng),
33882            )),
33883            OPEN_DRONE_ID_LOCATION_DATA::ID => Some(Self::OPEN_DRONE_ID_LOCATION(
33884                OPEN_DRONE_ID_LOCATION_DATA::random(rng),
33885            )),
33886            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => Some(Self::OPEN_DRONE_ID_MESSAGE_PACK(
33887                OPEN_DRONE_ID_MESSAGE_PACK_DATA::random(rng),
33888            )),
33889            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_OPERATOR_ID(
33890                OPEN_DRONE_ID_OPERATOR_ID_DATA::random(rng),
33891            )),
33892            OPEN_DRONE_ID_SELF_ID_DATA::ID => Some(Self::OPEN_DRONE_ID_SELF_ID(
33893                OPEN_DRONE_ID_SELF_ID_DATA::random(rng),
33894            )),
33895            OPEN_DRONE_ID_SYSTEM_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM(
33896                OPEN_DRONE_ID_SYSTEM_DATA::random(rng),
33897            )),
33898            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => Some(Self::OPEN_DRONE_ID_SYSTEM_UPDATE(
33899                OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::random(rng),
33900            )),
33901            OPTICAL_FLOW_DATA::ID => Some(Self::OPTICAL_FLOW(OPTICAL_FLOW_DATA::random(rng))),
33902            OPTICAL_FLOW_RAD_DATA::ID => {
33903                Some(Self::OPTICAL_FLOW_RAD(OPTICAL_FLOW_RAD_DATA::random(rng)))
33904            }
33905            ORBIT_EXECUTION_STATUS_DATA::ID => Some(Self::ORBIT_EXECUTION_STATUS(
33906                ORBIT_EXECUTION_STATUS_DATA::random(rng),
33907            )),
33908            PARAM_EXT_ACK_DATA::ID => Some(Self::PARAM_EXT_ACK(PARAM_EXT_ACK_DATA::random(rng))),
33909            PARAM_EXT_REQUEST_LIST_DATA::ID => Some(Self::PARAM_EXT_REQUEST_LIST(
33910                PARAM_EXT_REQUEST_LIST_DATA::random(rng),
33911            )),
33912            PARAM_EXT_REQUEST_READ_DATA::ID => Some(Self::PARAM_EXT_REQUEST_READ(
33913                PARAM_EXT_REQUEST_READ_DATA::random(rng),
33914            )),
33915            PARAM_EXT_SET_DATA::ID => Some(Self::PARAM_EXT_SET(PARAM_EXT_SET_DATA::random(rng))),
33916            PARAM_EXT_VALUE_DATA::ID => {
33917                Some(Self::PARAM_EXT_VALUE(PARAM_EXT_VALUE_DATA::random(rng)))
33918            }
33919            PARAM_MAP_RC_DATA::ID => Some(Self::PARAM_MAP_RC(PARAM_MAP_RC_DATA::random(rng))),
33920            PARAM_REQUEST_LIST_DATA::ID => Some(Self::PARAM_REQUEST_LIST(
33921                PARAM_REQUEST_LIST_DATA::random(rng),
33922            )),
33923            PARAM_REQUEST_READ_DATA::ID => Some(Self::PARAM_REQUEST_READ(
33924                PARAM_REQUEST_READ_DATA::random(rng),
33925            )),
33926            PARAM_SET_DATA::ID => Some(Self::PARAM_SET(PARAM_SET_DATA::random(rng))),
33927            PARAM_VALUE_DATA::ID => Some(Self::PARAM_VALUE(PARAM_VALUE_DATA::random(rng))),
33928            PING_DATA::ID => Some(Self::PING(PING_DATA::random(rng))),
33929            PLAY_TUNE_DATA::ID => Some(Self::PLAY_TUNE(PLAY_TUNE_DATA::random(rng))),
33930            PLAY_TUNE_V2_DATA::ID => Some(Self::PLAY_TUNE_V2(PLAY_TUNE_V2_DATA::random(rng))),
33931            POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::POSITION_TARGET_GLOBAL_INT(
33932                POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
33933            )),
33934            POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::POSITION_TARGET_LOCAL_NED(
33935                POSITION_TARGET_LOCAL_NED_DATA::random(rng),
33936            )),
33937            POWER_STATUS_DATA::ID => Some(Self::POWER_STATUS(POWER_STATUS_DATA::random(rng))),
33938            PROTOCOL_VERSION_DATA::ID => {
33939                Some(Self::PROTOCOL_VERSION(PROTOCOL_VERSION_DATA::random(rng)))
33940            }
33941            RADIO_CALIBRATION_DATA::ID => {
33942                Some(Self::RADIO_CALIBRATION(RADIO_CALIBRATION_DATA::random(rng)))
33943            }
33944            RADIO_STATUS_DATA::ID => Some(Self::RADIO_STATUS(RADIO_STATUS_DATA::random(rng))),
33945            RAW_IMU_DATA::ID => Some(Self::RAW_IMU(RAW_IMU_DATA::random(rng))),
33946            RAW_PRESSURE_DATA::ID => Some(Self::RAW_PRESSURE(RAW_PRESSURE_DATA::random(rng))),
33947            RAW_RPM_DATA::ID => Some(Self::RAW_RPM(RAW_RPM_DATA::random(rng))),
33948            RC_CHANNELS_DATA::ID => Some(Self::RC_CHANNELS(RC_CHANNELS_DATA::random(rng))),
33949            RC_CHANNELS_OVERRIDE_DATA::ID => Some(Self::RC_CHANNELS_OVERRIDE(
33950                RC_CHANNELS_OVERRIDE_DATA::random(rng),
33951            )),
33952            RC_CHANNELS_RAW_DATA::ID => {
33953                Some(Self::RC_CHANNELS_RAW(RC_CHANNELS_RAW_DATA::random(rng)))
33954            }
33955            RC_CHANNELS_SCALED_DATA::ID => Some(Self::RC_CHANNELS_SCALED(
33956                RC_CHANNELS_SCALED_DATA::random(rng),
33957            )),
33958            REQUEST_DATA_STREAM_DATA::ID => Some(Self::REQUEST_DATA_STREAM(
33959                REQUEST_DATA_STREAM_DATA::random(rng),
33960            )),
33961            REQUEST_EVENT_DATA::ID => Some(Self::REQUEST_EVENT(REQUEST_EVENT_DATA::random(rng))),
33962            RESOURCE_REQUEST_DATA::ID => {
33963                Some(Self::RESOURCE_REQUEST(RESOURCE_REQUEST_DATA::random(rng)))
33964            }
33965            RESPONSE_EVENT_ERROR_DATA::ID => Some(Self::RESPONSE_EVENT_ERROR(
33966                RESPONSE_EVENT_ERROR_DATA::random(rng),
33967            )),
33968            SAFETY_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_ALLOWED_AREA(
33969                SAFETY_ALLOWED_AREA_DATA::random(rng),
33970            )),
33971            SAFETY_SET_ALLOWED_AREA_DATA::ID => Some(Self::SAFETY_SET_ALLOWED_AREA(
33972                SAFETY_SET_ALLOWED_AREA_DATA::random(rng),
33973            )),
33974            SCALED_IMU_DATA::ID => Some(Self::SCALED_IMU(SCALED_IMU_DATA::random(rng))),
33975            SCALED_IMU2_DATA::ID => Some(Self::SCALED_IMU2(SCALED_IMU2_DATA::random(rng))),
33976            SCALED_IMU3_DATA::ID => Some(Self::SCALED_IMU3(SCALED_IMU3_DATA::random(rng))),
33977            SCALED_PRESSURE_DATA::ID => {
33978                Some(Self::SCALED_PRESSURE(SCALED_PRESSURE_DATA::random(rng)))
33979            }
33980            SCALED_PRESSURE2_DATA::ID => {
33981                Some(Self::SCALED_PRESSURE2(SCALED_PRESSURE2_DATA::random(rng)))
33982            }
33983            SCALED_PRESSURE3_DATA::ID => {
33984                Some(Self::SCALED_PRESSURE3(SCALED_PRESSURE3_DATA::random(rng)))
33985            }
33986            SERIAL_CONTROL_DATA::ID => Some(Self::SERIAL_CONTROL(SERIAL_CONTROL_DATA::random(rng))),
33987            SERVO_OUTPUT_RAW_DATA::ID => {
33988                Some(Self::SERVO_OUTPUT_RAW(SERVO_OUTPUT_RAW_DATA::random(rng)))
33989            }
33990            SETUP_SIGNING_DATA::ID => Some(Self::SETUP_SIGNING(SETUP_SIGNING_DATA::random(rng))),
33991            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => Some(Self::SET_ACTUATOR_CONTROL_TARGET(
33992                SET_ACTUATOR_CONTROL_TARGET_DATA::random(rng),
33993            )),
33994            SET_ATTITUDE_TARGET_DATA::ID => Some(Self::SET_ATTITUDE_TARGET(
33995                SET_ATTITUDE_TARGET_DATA::random(rng),
33996            )),
33997            SET_GPS_GLOBAL_ORIGIN_DATA::ID => Some(Self::SET_GPS_GLOBAL_ORIGIN(
33998                SET_GPS_GLOBAL_ORIGIN_DATA::random(rng),
33999            )),
34000            SET_HOME_POSITION_DATA::ID => {
34001                Some(Self::SET_HOME_POSITION(SET_HOME_POSITION_DATA::random(rng)))
34002            }
34003            SET_MODE_DATA::ID => Some(Self::SET_MODE(SET_MODE_DATA::random(rng))),
34004            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => Some(Self::SET_POSITION_TARGET_GLOBAL_INT(
34005                SET_POSITION_TARGET_GLOBAL_INT_DATA::random(rng),
34006            )),
34007            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => Some(Self::SET_POSITION_TARGET_LOCAL_NED(
34008                SET_POSITION_TARGET_LOCAL_NED_DATA::random(rng),
34009            )),
34010            SIM_STATE_DATA::ID => Some(Self::SIM_STATE(SIM_STATE_DATA::random(rng))),
34011            SMART_BATTERY_INFO_DATA::ID => Some(Self::SMART_BATTERY_INFO(
34012                SMART_BATTERY_INFO_DATA::random(rng),
34013            )),
34014            STATUSTEXT_DATA::ID => Some(Self::STATUSTEXT(STATUSTEXT_DATA::random(rng))),
34015            STORAGE_INFORMATION_DATA::ID => Some(Self::STORAGE_INFORMATION(
34016                STORAGE_INFORMATION_DATA::random(rng),
34017            )),
34018            SUPPORTED_TUNES_DATA::ID => {
34019                Some(Self::SUPPORTED_TUNES(SUPPORTED_TUNES_DATA::random(rng)))
34020            }
34021            SYSTEM_TIME_DATA::ID => Some(Self::SYSTEM_TIME(SYSTEM_TIME_DATA::random(rng))),
34022            SYS_STATUS_DATA::ID => Some(Self::SYS_STATUS(SYS_STATUS_DATA::random(rng))),
34023            TERRAIN_CHECK_DATA::ID => Some(Self::TERRAIN_CHECK(TERRAIN_CHECK_DATA::random(rng))),
34024            TERRAIN_DATA_DATA::ID => Some(Self::TERRAIN_DATA(TERRAIN_DATA_DATA::random(rng))),
34025            TERRAIN_REPORT_DATA::ID => Some(Self::TERRAIN_REPORT(TERRAIN_REPORT_DATA::random(rng))),
34026            TERRAIN_REQUEST_DATA::ID => {
34027                Some(Self::TERRAIN_REQUEST(TERRAIN_REQUEST_DATA::random(rng)))
34028            }
34029            TIMESYNC_DATA::ID => Some(Self::TIMESYNC(TIMESYNC_DATA::random(rng))),
34030            TIME_ESTIMATE_TO_TARGET_DATA::ID => Some(Self::TIME_ESTIMATE_TO_TARGET(
34031                TIME_ESTIMATE_TO_TARGET_DATA::random(rng),
34032            )),
34033            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34034                Some(Self::TRAJECTORY_REPRESENTATION_BEZIER(
34035                    TRAJECTORY_REPRESENTATION_BEZIER_DATA::random(rng),
34036                ))
34037            }
34038            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34039                Some(Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(
34040                    TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::random(rng),
34041                ))
34042            }
34043            TUNNEL_DATA::ID => Some(Self::TUNNEL(TUNNEL_DATA::random(rng))),
34044            UALBERTA_SYS_STATUS_DATA::ID => Some(Self::UALBERTA_SYS_STATUS(
34045                UALBERTA_SYS_STATUS_DATA::random(rng),
34046            )),
34047            UAVCAN_NODE_INFO_DATA::ID => {
34048                Some(Self::UAVCAN_NODE_INFO(UAVCAN_NODE_INFO_DATA::random(rng)))
34049            }
34050            UAVCAN_NODE_STATUS_DATA::ID => Some(Self::UAVCAN_NODE_STATUS(
34051                UAVCAN_NODE_STATUS_DATA::random(rng),
34052            )),
34053            UTM_GLOBAL_POSITION_DATA::ID => Some(Self::UTM_GLOBAL_POSITION(
34054                UTM_GLOBAL_POSITION_DATA::random(rng),
34055            )),
34056            V2_EXTENSION_DATA::ID => Some(Self::V2_EXTENSION(V2_EXTENSION_DATA::random(rng))),
34057            VFR_HUD_DATA::ID => Some(Self::VFR_HUD(VFR_HUD_DATA::random(rng))),
34058            VIBRATION_DATA::ID => Some(Self::VIBRATION(VIBRATION_DATA::random(rng))),
34059            VICON_POSITION_ESTIMATE_DATA::ID => Some(Self::VICON_POSITION_ESTIMATE(
34060                VICON_POSITION_ESTIMATE_DATA::random(rng),
34061            )),
34062            VIDEO_STREAM_INFORMATION_DATA::ID => Some(Self::VIDEO_STREAM_INFORMATION(
34063                VIDEO_STREAM_INFORMATION_DATA::random(rng),
34064            )),
34065            VIDEO_STREAM_STATUS_DATA::ID => Some(Self::VIDEO_STREAM_STATUS(
34066                VIDEO_STREAM_STATUS_DATA::random(rng),
34067            )),
34068            VISION_POSITION_ESTIMATE_DATA::ID => Some(Self::VISION_POSITION_ESTIMATE(
34069                VISION_POSITION_ESTIMATE_DATA::random(rng),
34070            )),
34071            VISION_SPEED_ESTIMATE_DATA::ID => Some(Self::VISION_SPEED_ESTIMATE(
34072                VISION_SPEED_ESTIMATE_DATA::random(rng),
34073            )),
34074            WHEEL_DISTANCE_DATA::ID => Some(Self::WHEEL_DISTANCE(WHEEL_DISTANCE_DATA::random(rng))),
34075            WIFI_CONFIG_AP_DATA::ID => Some(Self::WIFI_CONFIG_AP(WIFI_CONFIG_AP_DATA::random(rng))),
34076            WINCH_STATUS_DATA::ID => Some(Self::WINCH_STATUS(WINCH_STATUS_DATA::random(rng))),
34077            WIND_COV_DATA::ID => Some(Self::WIND_COV(WIND_COV_DATA::random(rng))),
34078            _ => None,
34079        }
34080    }
34081    fn ser(&self, version: MavlinkVersion, bytes: &mut [u8]) -> usize {
34082        match self {
34083            Self::ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34084            Self::ACTUATOR_OUTPUT_STATUS(body) => body.ser(version, bytes),
34085            Self::ADSB_VEHICLE(body) => body.ser(version, bytes),
34086            Self::AIS_VESSEL(body) => body.ser(version, bytes),
34087            Self::ALTITUDE(body) => body.ser(version, bytes),
34088            Self::ATTITUDE(body) => body.ser(version, bytes),
34089            Self::ATTITUDE_QUATERNION(body) => body.ser(version, bytes),
34090            Self::ATTITUDE_QUATERNION_COV(body) => body.ser(version, bytes),
34091            Self::ATTITUDE_TARGET(body) => body.ser(version, bytes),
34092            Self::ATT_POS_MOCAP(body) => body.ser(version, bytes),
34093            Self::AUTH_KEY(body) => body.ser(version, bytes),
34094            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(body) => body.ser(version, bytes),
34095            Self::AUTOPILOT_VERSION(body) => body.ser(version, bytes),
34096            Self::AVAILABLE_MODES(body) => body.ser(version, bytes),
34097            Self::AVAILABLE_MODES_MONITOR(body) => body.ser(version, bytes),
34098            Self::BATTERY_INFO(body) => body.ser(version, bytes),
34099            Self::BATTERY_STATUS(body) => body.ser(version, bytes),
34100            Self::BUTTON_CHANGE(body) => body.ser(version, bytes),
34101            Self::CAMERA_CAPTURE_STATUS(body) => body.ser(version, bytes),
34102            Self::CAMERA_FOV_STATUS(body) => body.ser(version, bytes),
34103            Self::CAMERA_IMAGE_CAPTURED(body) => body.ser(version, bytes),
34104            Self::CAMERA_INFORMATION(body) => body.ser(version, bytes),
34105            Self::CAMERA_SETTINGS(body) => body.ser(version, bytes),
34106            Self::CAMERA_THERMAL_RANGE(body) => body.ser(version, bytes),
34107            Self::CAMERA_TRACKING_GEO_STATUS(body) => body.ser(version, bytes),
34108            Self::CAMERA_TRACKING_IMAGE_STATUS(body) => body.ser(version, bytes),
34109            Self::CAMERA_TRIGGER(body) => body.ser(version, bytes),
34110            Self::CANFD_FRAME(body) => body.ser(version, bytes),
34111            Self::CAN_FILTER_MODIFY(body) => body.ser(version, bytes),
34112            Self::CAN_FRAME(body) => body.ser(version, bytes),
34113            Self::CELLULAR_CONFIG(body) => body.ser(version, bytes),
34114            Self::CELLULAR_STATUS(body) => body.ser(version, bytes),
34115            Self::CHANGE_OPERATOR_CONTROL(body) => body.ser(version, bytes),
34116            Self::CHANGE_OPERATOR_CONTROL_ACK(body) => body.ser(version, bytes),
34117            Self::COLLISION(body) => body.ser(version, bytes),
34118            Self::COMMAND_ACK(body) => body.ser(version, bytes),
34119            Self::COMMAND_CANCEL(body) => body.ser(version, bytes),
34120            Self::COMMAND_INT(body) => body.ser(version, bytes),
34121            Self::COMMAND_LONG(body) => body.ser(version, bytes),
34122            Self::COMPONENT_INFORMATION(body) => body.ser(version, bytes),
34123            Self::COMPONENT_INFORMATION_BASIC(body) => body.ser(version, bytes),
34124            Self::COMPONENT_METADATA(body) => body.ser(version, bytes),
34125            Self::CONTROL_SYSTEM_STATE(body) => body.ser(version, bytes),
34126            Self::CURRENT_EVENT_SEQUENCE(body) => body.ser(version, bytes),
34127            Self::CURRENT_MODE(body) => body.ser(version, bytes),
34128            Self::DATA_STREAM(body) => body.ser(version, bytes),
34129            Self::DATA_TRANSMISSION_HANDSHAKE(body) => body.ser(version, bytes),
34130            Self::DEBUG(body) => body.ser(version, bytes),
34131            Self::DEBUG_FLOAT_ARRAY(body) => body.ser(version, bytes),
34132            Self::DEBUG_VECT(body) => body.ser(version, bytes),
34133            Self::DISTANCE_SENSOR(body) => body.ser(version, bytes),
34134            Self::EFI_STATUS(body) => body.ser(version, bytes),
34135            Self::ENCAPSULATED_DATA(body) => body.ser(version, bytes),
34136            Self::ESC_INFO(body) => body.ser(version, bytes),
34137            Self::ESC_STATUS(body) => body.ser(version, bytes),
34138            Self::ESTIMATOR_STATUS(body) => body.ser(version, bytes),
34139            Self::EVENT(body) => body.ser(version, bytes),
34140            Self::EXTENDED_SYS_STATE(body) => body.ser(version, bytes),
34141            Self::FENCE_STATUS(body) => body.ser(version, bytes),
34142            Self::FILE_TRANSFER_PROTOCOL(body) => body.ser(version, bytes),
34143            Self::FLIGHT_INFORMATION(body) => body.ser(version, bytes),
34144            Self::FOLLOW_TARGET(body) => body.ser(version, bytes),
34145            Self::FUEL_STATUS(body) => body.ser(version, bytes),
34146            Self::GENERATOR_STATUS(body) => body.ser(version, bytes),
34147            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(body) => body.ser(version, bytes),
34148            Self::GIMBAL_DEVICE_INFORMATION(body) => body.ser(version, bytes),
34149            Self::GIMBAL_DEVICE_SET_ATTITUDE(body) => body.ser(version, bytes),
34150            Self::GIMBAL_MANAGER_INFORMATION(body) => body.ser(version, bytes),
34151            Self::GIMBAL_MANAGER_SET_ATTITUDE(body) => body.ser(version, bytes),
34152            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(body) => body.ser(version, bytes),
34153            Self::GIMBAL_MANAGER_SET_PITCHYAW(body) => body.ser(version, bytes),
34154            Self::GIMBAL_MANAGER_STATUS(body) => body.ser(version, bytes),
34155            Self::GLOBAL_POSITION_INT(body) => body.ser(version, bytes),
34156            Self::GLOBAL_POSITION_INT_COV(body) => body.ser(version, bytes),
34157            Self::GLOBAL_VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34158            Self::GPS2_RAW(body) => body.ser(version, bytes),
34159            Self::GPS2_RTK(body) => body.ser(version, bytes),
34160            Self::GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34161            Self::GPS_INJECT_DATA(body) => body.ser(version, bytes),
34162            Self::GPS_INPUT(body) => body.ser(version, bytes),
34163            Self::GPS_RAW_INT(body) => body.ser(version, bytes),
34164            Self::GPS_RTCM_DATA(body) => body.ser(version, bytes),
34165            Self::GPS_RTK(body) => body.ser(version, bytes),
34166            Self::GPS_STATUS(body) => body.ser(version, bytes),
34167            Self::HEARTBEAT(body) => body.ser(version, bytes),
34168            Self::HIGHRES_IMU(body) => body.ser(version, bytes),
34169            Self::HIGH_LATENCY(body) => body.ser(version, bytes),
34170            Self::HIGH_LATENCY2(body) => body.ser(version, bytes),
34171            Self::HIL_ACTUATOR_CONTROLS(body) => body.ser(version, bytes),
34172            Self::HIL_CONTROLS(body) => body.ser(version, bytes),
34173            Self::HIL_GPS(body) => body.ser(version, bytes),
34174            Self::HIL_OPTICAL_FLOW(body) => body.ser(version, bytes),
34175            Self::HIL_RC_INPUTS_RAW(body) => body.ser(version, bytes),
34176            Self::HIL_SENSOR(body) => body.ser(version, bytes),
34177            Self::HIL_STATE(body) => body.ser(version, bytes),
34178            Self::HIL_STATE_QUATERNION(body) => body.ser(version, bytes),
34179            Self::HOME_POSITION(body) => body.ser(version, bytes),
34180            Self::HYGROMETER_SENSOR(body) => body.ser(version, bytes),
34181            Self::ILLUMINATOR_STATUS(body) => body.ser(version, bytes),
34182            Self::ISBD_LINK_STATUS(body) => body.ser(version, bytes),
34183            Self::LANDING_TARGET(body) => body.ser(version, bytes),
34184            Self::LINK_NODE_STATUS(body) => body.ser(version, bytes),
34185            Self::LOCAL_POSITION_NED(body) => body.ser(version, bytes),
34186            Self::LOCAL_POSITION_NED_COV(body) => body.ser(version, bytes),
34187            Self::LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET(body) => body.ser(version, bytes),
34188            Self::LOGGING_ACK(body) => body.ser(version, bytes),
34189            Self::LOGGING_DATA(body) => body.ser(version, bytes),
34190            Self::LOGGING_DATA_ACKED(body) => body.ser(version, bytes),
34191            Self::LOG_DATA(body) => body.ser(version, bytes),
34192            Self::LOG_ENTRY(body) => body.ser(version, bytes),
34193            Self::LOG_ERASE(body) => body.ser(version, bytes),
34194            Self::LOG_REQUEST_DATA(body) => body.ser(version, bytes),
34195            Self::LOG_REQUEST_END(body) => body.ser(version, bytes),
34196            Self::LOG_REQUEST_LIST(body) => body.ser(version, bytes),
34197            Self::MAG_CAL_REPORT(body) => body.ser(version, bytes),
34198            Self::MANUAL_CONTROL(body) => body.ser(version, bytes),
34199            Self::MANUAL_SETPOINT(body) => body.ser(version, bytes),
34200            Self::MEMORY_VECT(body) => body.ser(version, bytes),
34201            Self::MESSAGE_INTERVAL(body) => body.ser(version, bytes),
34202            Self::MISSION_ACK(body) => body.ser(version, bytes),
34203            Self::MISSION_CLEAR_ALL(body) => body.ser(version, bytes),
34204            Self::MISSION_COUNT(body) => body.ser(version, bytes),
34205            Self::MISSION_CURRENT(body) => body.ser(version, bytes),
34206            Self::MISSION_ITEM(body) => body.ser(version, bytes),
34207            Self::MISSION_ITEM_INT(body) => body.ser(version, bytes),
34208            Self::MISSION_ITEM_REACHED(body) => body.ser(version, bytes),
34209            Self::MISSION_REQUEST(body) => body.ser(version, bytes),
34210            Self::MISSION_REQUEST_INT(body) => body.ser(version, bytes),
34211            Self::MISSION_REQUEST_LIST(body) => body.ser(version, bytes),
34212            Self::MISSION_REQUEST_PARTIAL_LIST(body) => body.ser(version, bytes),
34213            Self::MISSION_SET_CURRENT(body) => body.ser(version, bytes),
34214            Self::MISSION_WRITE_PARTIAL_LIST(body) => body.ser(version, bytes),
34215            Self::MOUNT_ORIENTATION(body) => body.ser(version, bytes),
34216            Self::NAMED_VALUE_FLOAT(body) => body.ser(version, bytes),
34217            Self::NAMED_VALUE_INT(body) => body.ser(version, bytes),
34218            Self::NAV_CONTROLLER_OUTPUT(body) => body.ser(version, bytes),
34219            Self::NAV_FILTER_BIAS(body) => body.ser(version, bytes),
34220            Self::OBSTACLE_DISTANCE(body) => body.ser(version, bytes),
34221            Self::ODOMETRY(body) => body.ser(version, bytes),
34222            Self::ONBOARD_COMPUTER_STATUS(body) => body.ser(version, bytes),
34223            Self::OPEN_DRONE_ID_ARM_STATUS(body) => body.ser(version, bytes),
34224            Self::OPEN_DRONE_ID_AUTHENTICATION(body) => body.ser(version, bytes),
34225            Self::OPEN_DRONE_ID_BASIC_ID(body) => body.ser(version, bytes),
34226            Self::OPEN_DRONE_ID_LOCATION(body) => body.ser(version, bytes),
34227            Self::OPEN_DRONE_ID_MESSAGE_PACK(body) => body.ser(version, bytes),
34228            Self::OPEN_DRONE_ID_OPERATOR_ID(body) => body.ser(version, bytes),
34229            Self::OPEN_DRONE_ID_SELF_ID(body) => body.ser(version, bytes),
34230            Self::OPEN_DRONE_ID_SYSTEM(body) => body.ser(version, bytes),
34231            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(body) => body.ser(version, bytes),
34232            Self::OPTICAL_FLOW(body) => body.ser(version, bytes),
34233            Self::OPTICAL_FLOW_RAD(body) => body.ser(version, bytes),
34234            Self::ORBIT_EXECUTION_STATUS(body) => body.ser(version, bytes),
34235            Self::PARAM_EXT_ACK(body) => body.ser(version, bytes),
34236            Self::PARAM_EXT_REQUEST_LIST(body) => body.ser(version, bytes),
34237            Self::PARAM_EXT_REQUEST_READ(body) => body.ser(version, bytes),
34238            Self::PARAM_EXT_SET(body) => body.ser(version, bytes),
34239            Self::PARAM_EXT_VALUE(body) => body.ser(version, bytes),
34240            Self::PARAM_MAP_RC(body) => body.ser(version, bytes),
34241            Self::PARAM_REQUEST_LIST(body) => body.ser(version, bytes),
34242            Self::PARAM_REQUEST_READ(body) => body.ser(version, bytes),
34243            Self::PARAM_SET(body) => body.ser(version, bytes),
34244            Self::PARAM_VALUE(body) => body.ser(version, bytes),
34245            Self::PING(body) => body.ser(version, bytes),
34246            Self::PLAY_TUNE(body) => body.ser(version, bytes),
34247            Self::PLAY_TUNE_V2(body) => body.ser(version, bytes),
34248            Self::POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34249            Self::POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34250            Self::POWER_STATUS(body) => body.ser(version, bytes),
34251            Self::PROTOCOL_VERSION(body) => body.ser(version, bytes),
34252            Self::RADIO_CALIBRATION(body) => body.ser(version, bytes),
34253            Self::RADIO_STATUS(body) => body.ser(version, bytes),
34254            Self::RAW_IMU(body) => body.ser(version, bytes),
34255            Self::RAW_PRESSURE(body) => body.ser(version, bytes),
34256            Self::RAW_RPM(body) => body.ser(version, bytes),
34257            Self::RC_CHANNELS(body) => body.ser(version, bytes),
34258            Self::RC_CHANNELS_OVERRIDE(body) => body.ser(version, bytes),
34259            Self::RC_CHANNELS_RAW(body) => body.ser(version, bytes),
34260            Self::RC_CHANNELS_SCALED(body) => body.ser(version, bytes),
34261            Self::REQUEST_DATA_STREAM(body) => body.ser(version, bytes),
34262            Self::REQUEST_EVENT(body) => body.ser(version, bytes),
34263            Self::RESOURCE_REQUEST(body) => body.ser(version, bytes),
34264            Self::RESPONSE_EVENT_ERROR(body) => body.ser(version, bytes),
34265            Self::SAFETY_ALLOWED_AREA(body) => body.ser(version, bytes),
34266            Self::SAFETY_SET_ALLOWED_AREA(body) => body.ser(version, bytes),
34267            Self::SCALED_IMU(body) => body.ser(version, bytes),
34268            Self::SCALED_IMU2(body) => body.ser(version, bytes),
34269            Self::SCALED_IMU3(body) => body.ser(version, bytes),
34270            Self::SCALED_PRESSURE(body) => body.ser(version, bytes),
34271            Self::SCALED_PRESSURE2(body) => body.ser(version, bytes),
34272            Self::SCALED_PRESSURE3(body) => body.ser(version, bytes),
34273            Self::SERIAL_CONTROL(body) => body.ser(version, bytes),
34274            Self::SERVO_OUTPUT_RAW(body) => body.ser(version, bytes),
34275            Self::SETUP_SIGNING(body) => body.ser(version, bytes),
34276            Self::SET_ACTUATOR_CONTROL_TARGET(body) => body.ser(version, bytes),
34277            Self::SET_ATTITUDE_TARGET(body) => body.ser(version, bytes),
34278            Self::SET_GPS_GLOBAL_ORIGIN(body) => body.ser(version, bytes),
34279            Self::SET_HOME_POSITION(body) => body.ser(version, bytes),
34280            Self::SET_MODE(body) => body.ser(version, bytes),
34281            Self::SET_POSITION_TARGET_GLOBAL_INT(body) => body.ser(version, bytes),
34282            Self::SET_POSITION_TARGET_LOCAL_NED(body) => body.ser(version, bytes),
34283            Self::SIM_STATE(body) => body.ser(version, bytes),
34284            Self::SMART_BATTERY_INFO(body) => body.ser(version, bytes),
34285            Self::STATUSTEXT(body) => body.ser(version, bytes),
34286            Self::STORAGE_INFORMATION(body) => body.ser(version, bytes),
34287            Self::SUPPORTED_TUNES(body) => body.ser(version, bytes),
34288            Self::SYSTEM_TIME(body) => body.ser(version, bytes),
34289            Self::SYS_STATUS(body) => body.ser(version, bytes),
34290            Self::TERRAIN_CHECK(body) => body.ser(version, bytes),
34291            Self::TERRAIN_DATA(body) => body.ser(version, bytes),
34292            Self::TERRAIN_REPORT(body) => body.ser(version, bytes),
34293            Self::TERRAIN_REQUEST(body) => body.ser(version, bytes),
34294            Self::TIMESYNC(body) => body.ser(version, bytes),
34295            Self::TIME_ESTIMATE_TO_TARGET(body) => body.ser(version, bytes),
34296            Self::TRAJECTORY_REPRESENTATION_BEZIER(body) => body.ser(version, bytes),
34297            Self::TRAJECTORY_REPRESENTATION_WAYPOINTS(body) => body.ser(version, bytes),
34298            Self::TUNNEL(body) => body.ser(version, bytes),
34299            Self::UALBERTA_SYS_STATUS(body) => body.ser(version, bytes),
34300            Self::UAVCAN_NODE_INFO(body) => body.ser(version, bytes),
34301            Self::UAVCAN_NODE_STATUS(body) => body.ser(version, bytes),
34302            Self::UTM_GLOBAL_POSITION(body) => body.ser(version, bytes),
34303            Self::V2_EXTENSION(body) => body.ser(version, bytes),
34304            Self::VFR_HUD(body) => body.ser(version, bytes),
34305            Self::VIBRATION(body) => body.ser(version, bytes),
34306            Self::VICON_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34307            Self::VIDEO_STREAM_INFORMATION(body) => body.ser(version, bytes),
34308            Self::VIDEO_STREAM_STATUS(body) => body.ser(version, bytes),
34309            Self::VISION_POSITION_ESTIMATE(body) => body.ser(version, bytes),
34310            Self::VISION_SPEED_ESTIMATE(body) => body.ser(version, bytes),
34311            Self::WHEEL_DISTANCE(body) => body.ser(version, bytes),
34312            Self::WIFI_CONFIG_AP(body) => body.ser(version, bytes),
34313            Self::WINCH_STATUS(body) => body.ser(version, bytes),
34314            Self::WIND_COV(body) => body.ser(version, bytes),
34315        }
34316    }
34317    fn extra_crc(id: u32) -> u8 {
34318        match id {
34319            ACTUATOR_CONTROL_TARGET_DATA::ID => ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34320            ACTUATOR_OUTPUT_STATUS_DATA::ID => ACTUATOR_OUTPUT_STATUS_DATA::EXTRA_CRC,
34321            ADSB_VEHICLE_DATA::ID => ADSB_VEHICLE_DATA::EXTRA_CRC,
34322            AIS_VESSEL_DATA::ID => AIS_VESSEL_DATA::EXTRA_CRC,
34323            ALTITUDE_DATA::ID => ALTITUDE_DATA::EXTRA_CRC,
34324            ATTITUDE_DATA::ID => ATTITUDE_DATA::EXTRA_CRC,
34325            ATTITUDE_QUATERNION_DATA::ID => ATTITUDE_QUATERNION_DATA::EXTRA_CRC,
34326            ATTITUDE_QUATERNION_COV_DATA::ID => ATTITUDE_QUATERNION_COV_DATA::EXTRA_CRC,
34327            ATTITUDE_TARGET_DATA::ID => ATTITUDE_TARGET_DATA::EXTRA_CRC,
34328            ATT_POS_MOCAP_DATA::ID => ATT_POS_MOCAP_DATA::EXTRA_CRC,
34329            AUTH_KEY_DATA::ID => AUTH_KEY_DATA::EXTRA_CRC,
34330            AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::ID => {
34331                AUTOPILOT_STATE_FOR_GIMBAL_DEVICE_DATA::EXTRA_CRC
34332            }
34333            AUTOPILOT_VERSION_DATA::ID => AUTOPILOT_VERSION_DATA::EXTRA_CRC,
34334            AVAILABLE_MODES_DATA::ID => AVAILABLE_MODES_DATA::EXTRA_CRC,
34335            AVAILABLE_MODES_MONITOR_DATA::ID => AVAILABLE_MODES_MONITOR_DATA::EXTRA_CRC,
34336            BATTERY_INFO_DATA::ID => BATTERY_INFO_DATA::EXTRA_CRC,
34337            BATTERY_STATUS_DATA::ID => BATTERY_STATUS_DATA::EXTRA_CRC,
34338            BUTTON_CHANGE_DATA::ID => BUTTON_CHANGE_DATA::EXTRA_CRC,
34339            CAMERA_CAPTURE_STATUS_DATA::ID => CAMERA_CAPTURE_STATUS_DATA::EXTRA_CRC,
34340            CAMERA_FOV_STATUS_DATA::ID => CAMERA_FOV_STATUS_DATA::EXTRA_CRC,
34341            CAMERA_IMAGE_CAPTURED_DATA::ID => CAMERA_IMAGE_CAPTURED_DATA::EXTRA_CRC,
34342            CAMERA_INFORMATION_DATA::ID => CAMERA_INFORMATION_DATA::EXTRA_CRC,
34343            CAMERA_SETTINGS_DATA::ID => CAMERA_SETTINGS_DATA::EXTRA_CRC,
34344            CAMERA_THERMAL_RANGE_DATA::ID => CAMERA_THERMAL_RANGE_DATA::EXTRA_CRC,
34345            CAMERA_TRACKING_GEO_STATUS_DATA::ID => CAMERA_TRACKING_GEO_STATUS_DATA::EXTRA_CRC,
34346            CAMERA_TRACKING_IMAGE_STATUS_DATA::ID => CAMERA_TRACKING_IMAGE_STATUS_DATA::EXTRA_CRC,
34347            CAMERA_TRIGGER_DATA::ID => CAMERA_TRIGGER_DATA::EXTRA_CRC,
34348            CANFD_FRAME_DATA::ID => CANFD_FRAME_DATA::EXTRA_CRC,
34349            CAN_FILTER_MODIFY_DATA::ID => CAN_FILTER_MODIFY_DATA::EXTRA_CRC,
34350            CAN_FRAME_DATA::ID => CAN_FRAME_DATA::EXTRA_CRC,
34351            CELLULAR_CONFIG_DATA::ID => CELLULAR_CONFIG_DATA::EXTRA_CRC,
34352            CELLULAR_STATUS_DATA::ID => CELLULAR_STATUS_DATA::EXTRA_CRC,
34353            CHANGE_OPERATOR_CONTROL_DATA::ID => CHANGE_OPERATOR_CONTROL_DATA::EXTRA_CRC,
34354            CHANGE_OPERATOR_CONTROL_ACK_DATA::ID => CHANGE_OPERATOR_CONTROL_ACK_DATA::EXTRA_CRC,
34355            COLLISION_DATA::ID => COLLISION_DATA::EXTRA_CRC,
34356            COMMAND_ACK_DATA::ID => COMMAND_ACK_DATA::EXTRA_CRC,
34357            COMMAND_CANCEL_DATA::ID => COMMAND_CANCEL_DATA::EXTRA_CRC,
34358            COMMAND_INT_DATA::ID => COMMAND_INT_DATA::EXTRA_CRC,
34359            COMMAND_LONG_DATA::ID => COMMAND_LONG_DATA::EXTRA_CRC,
34360            COMPONENT_INFORMATION_DATA::ID => COMPONENT_INFORMATION_DATA::EXTRA_CRC,
34361            COMPONENT_INFORMATION_BASIC_DATA::ID => COMPONENT_INFORMATION_BASIC_DATA::EXTRA_CRC,
34362            COMPONENT_METADATA_DATA::ID => COMPONENT_METADATA_DATA::EXTRA_CRC,
34363            CONTROL_SYSTEM_STATE_DATA::ID => CONTROL_SYSTEM_STATE_DATA::EXTRA_CRC,
34364            CURRENT_EVENT_SEQUENCE_DATA::ID => CURRENT_EVENT_SEQUENCE_DATA::EXTRA_CRC,
34365            CURRENT_MODE_DATA::ID => CURRENT_MODE_DATA::EXTRA_CRC,
34366            DATA_STREAM_DATA::ID => DATA_STREAM_DATA::EXTRA_CRC,
34367            DATA_TRANSMISSION_HANDSHAKE_DATA::ID => DATA_TRANSMISSION_HANDSHAKE_DATA::EXTRA_CRC,
34368            DEBUG_DATA::ID => DEBUG_DATA::EXTRA_CRC,
34369            DEBUG_FLOAT_ARRAY_DATA::ID => DEBUG_FLOAT_ARRAY_DATA::EXTRA_CRC,
34370            DEBUG_VECT_DATA::ID => DEBUG_VECT_DATA::EXTRA_CRC,
34371            DISTANCE_SENSOR_DATA::ID => DISTANCE_SENSOR_DATA::EXTRA_CRC,
34372            EFI_STATUS_DATA::ID => EFI_STATUS_DATA::EXTRA_CRC,
34373            ENCAPSULATED_DATA_DATA::ID => ENCAPSULATED_DATA_DATA::EXTRA_CRC,
34374            ESC_INFO_DATA::ID => ESC_INFO_DATA::EXTRA_CRC,
34375            ESC_STATUS_DATA::ID => ESC_STATUS_DATA::EXTRA_CRC,
34376            ESTIMATOR_STATUS_DATA::ID => ESTIMATOR_STATUS_DATA::EXTRA_CRC,
34377            EVENT_DATA::ID => EVENT_DATA::EXTRA_CRC,
34378            EXTENDED_SYS_STATE_DATA::ID => EXTENDED_SYS_STATE_DATA::EXTRA_CRC,
34379            FENCE_STATUS_DATA::ID => FENCE_STATUS_DATA::EXTRA_CRC,
34380            FILE_TRANSFER_PROTOCOL_DATA::ID => FILE_TRANSFER_PROTOCOL_DATA::EXTRA_CRC,
34381            FLIGHT_INFORMATION_DATA::ID => FLIGHT_INFORMATION_DATA::EXTRA_CRC,
34382            FOLLOW_TARGET_DATA::ID => FOLLOW_TARGET_DATA::EXTRA_CRC,
34383            FUEL_STATUS_DATA::ID => FUEL_STATUS_DATA::EXTRA_CRC,
34384            GENERATOR_STATUS_DATA::ID => GENERATOR_STATUS_DATA::EXTRA_CRC,
34385            GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::ID => GIMBAL_DEVICE_ATTITUDE_STATUS_DATA::EXTRA_CRC,
34386            GIMBAL_DEVICE_INFORMATION_DATA::ID => GIMBAL_DEVICE_INFORMATION_DATA::EXTRA_CRC,
34387            GIMBAL_DEVICE_SET_ATTITUDE_DATA::ID => GIMBAL_DEVICE_SET_ATTITUDE_DATA::EXTRA_CRC,
34388            GIMBAL_MANAGER_INFORMATION_DATA::ID => GIMBAL_MANAGER_INFORMATION_DATA::EXTRA_CRC,
34389            GIMBAL_MANAGER_SET_ATTITUDE_DATA::ID => GIMBAL_MANAGER_SET_ATTITUDE_DATA::EXTRA_CRC,
34390            GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::ID => {
34391                GIMBAL_MANAGER_SET_MANUAL_CONTROL_DATA::EXTRA_CRC
34392            }
34393            GIMBAL_MANAGER_SET_PITCHYAW_DATA::ID => GIMBAL_MANAGER_SET_PITCHYAW_DATA::EXTRA_CRC,
34394            GIMBAL_MANAGER_STATUS_DATA::ID => GIMBAL_MANAGER_STATUS_DATA::EXTRA_CRC,
34395            GLOBAL_POSITION_INT_DATA::ID => GLOBAL_POSITION_INT_DATA::EXTRA_CRC,
34396            GLOBAL_POSITION_INT_COV_DATA::ID => GLOBAL_POSITION_INT_COV_DATA::EXTRA_CRC,
34397            GLOBAL_VISION_POSITION_ESTIMATE_DATA::ID => {
34398                GLOBAL_VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC
34399            }
34400            GPS2_RAW_DATA::ID => GPS2_RAW_DATA::EXTRA_CRC,
34401            GPS2_RTK_DATA::ID => GPS2_RTK_DATA::EXTRA_CRC,
34402            GPS_GLOBAL_ORIGIN_DATA::ID => GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34403            GPS_INJECT_DATA_DATA::ID => GPS_INJECT_DATA_DATA::EXTRA_CRC,
34404            GPS_INPUT_DATA::ID => GPS_INPUT_DATA::EXTRA_CRC,
34405            GPS_RAW_INT_DATA::ID => GPS_RAW_INT_DATA::EXTRA_CRC,
34406            GPS_RTCM_DATA_DATA::ID => GPS_RTCM_DATA_DATA::EXTRA_CRC,
34407            GPS_RTK_DATA::ID => GPS_RTK_DATA::EXTRA_CRC,
34408            GPS_STATUS_DATA::ID => GPS_STATUS_DATA::EXTRA_CRC,
34409            HEARTBEAT_DATA::ID => HEARTBEAT_DATA::EXTRA_CRC,
34410            HIGHRES_IMU_DATA::ID => HIGHRES_IMU_DATA::EXTRA_CRC,
34411            HIGH_LATENCY_DATA::ID => HIGH_LATENCY_DATA::EXTRA_CRC,
34412            HIGH_LATENCY2_DATA::ID => HIGH_LATENCY2_DATA::EXTRA_CRC,
34413            HIL_ACTUATOR_CONTROLS_DATA::ID => HIL_ACTUATOR_CONTROLS_DATA::EXTRA_CRC,
34414            HIL_CONTROLS_DATA::ID => HIL_CONTROLS_DATA::EXTRA_CRC,
34415            HIL_GPS_DATA::ID => HIL_GPS_DATA::EXTRA_CRC,
34416            HIL_OPTICAL_FLOW_DATA::ID => HIL_OPTICAL_FLOW_DATA::EXTRA_CRC,
34417            HIL_RC_INPUTS_RAW_DATA::ID => HIL_RC_INPUTS_RAW_DATA::EXTRA_CRC,
34418            HIL_SENSOR_DATA::ID => HIL_SENSOR_DATA::EXTRA_CRC,
34419            HIL_STATE_DATA::ID => HIL_STATE_DATA::EXTRA_CRC,
34420            HIL_STATE_QUATERNION_DATA::ID => HIL_STATE_QUATERNION_DATA::EXTRA_CRC,
34421            HOME_POSITION_DATA::ID => HOME_POSITION_DATA::EXTRA_CRC,
34422            HYGROMETER_SENSOR_DATA::ID => HYGROMETER_SENSOR_DATA::EXTRA_CRC,
34423            ILLUMINATOR_STATUS_DATA::ID => ILLUMINATOR_STATUS_DATA::EXTRA_CRC,
34424            ISBD_LINK_STATUS_DATA::ID => ISBD_LINK_STATUS_DATA::EXTRA_CRC,
34425            LANDING_TARGET_DATA::ID => LANDING_TARGET_DATA::EXTRA_CRC,
34426            LINK_NODE_STATUS_DATA::ID => LINK_NODE_STATUS_DATA::EXTRA_CRC,
34427            LOCAL_POSITION_NED_DATA::ID => LOCAL_POSITION_NED_DATA::EXTRA_CRC,
34428            LOCAL_POSITION_NED_COV_DATA::ID => LOCAL_POSITION_NED_COV_DATA::EXTRA_CRC,
34429            LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::ID => {
34430                LOCAL_POSITION_NED_SYSTEM_GLOBAL_OFFSET_DATA::EXTRA_CRC
34431            }
34432            LOGGING_ACK_DATA::ID => LOGGING_ACK_DATA::EXTRA_CRC,
34433            LOGGING_DATA_DATA::ID => LOGGING_DATA_DATA::EXTRA_CRC,
34434            LOGGING_DATA_ACKED_DATA::ID => LOGGING_DATA_ACKED_DATA::EXTRA_CRC,
34435            LOG_DATA_DATA::ID => LOG_DATA_DATA::EXTRA_CRC,
34436            LOG_ENTRY_DATA::ID => LOG_ENTRY_DATA::EXTRA_CRC,
34437            LOG_ERASE_DATA::ID => LOG_ERASE_DATA::EXTRA_CRC,
34438            LOG_REQUEST_DATA_DATA::ID => LOG_REQUEST_DATA_DATA::EXTRA_CRC,
34439            LOG_REQUEST_END_DATA::ID => LOG_REQUEST_END_DATA::EXTRA_CRC,
34440            LOG_REQUEST_LIST_DATA::ID => LOG_REQUEST_LIST_DATA::EXTRA_CRC,
34441            MAG_CAL_REPORT_DATA::ID => MAG_CAL_REPORT_DATA::EXTRA_CRC,
34442            MANUAL_CONTROL_DATA::ID => MANUAL_CONTROL_DATA::EXTRA_CRC,
34443            MANUAL_SETPOINT_DATA::ID => MANUAL_SETPOINT_DATA::EXTRA_CRC,
34444            MEMORY_VECT_DATA::ID => MEMORY_VECT_DATA::EXTRA_CRC,
34445            MESSAGE_INTERVAL_DATA::ID => MESSAGE_INTERVAL_DATA::EXTRA_CRC,
34446            MISSION_ACK_DATA::ID => MISSION_ACK_DATA::EXTRA_CRC,
34447            MISSION_CLEAR_ALL_DATA::ID => MISSION_CLEAR_ALL_DATA::EXTRA_CRC,
34448            MISSION_COUNT_DATA::ID => MISSION_COUNT_DATA::EXTRA_CRC,
34449            MISSION_CURRENT_DATA::ID => MISSION_CURRENT_DATA::EXTRA_CRC,
34450            MISSION_ITEM_DATA::ID => MISSION_ITEM_DATA::EXTRA_CRC,
34451            MISSION_ITEM_INT_DATA::ID => MISSION_ITEM_INT_DATA::EXTRA_CRC,
34452            MISSION_ITEM_REACHED_DATA::ID => MISSION_ITEM_REACHED_DATA::EXTRA_CRC,
34453            MISSION_REQUEST_DATA::ID => MISSION_REQUEST_DATA::EXTRA_CRC,
34454            MISSION_REQUEST_INT_DATA::ID => MISSION_REQUEST_INT_DATA::EXTRA_CRC,
34455            MISSION_REQUEST_LIST_DATA::ID => MISSION_REQUEST_LIST_DATA::EXTRA_CRC,
34456            MISSION_REQUEST_PARTIAL_LIST_DATA::ID => MISSION_REQUEST_PARTIAL_LIST_DATA::EXTRA_CRC,
34457            MISSION_SET_CURRENT_DATA::ID => MISSION_SET_CURRENT_DATA::EXTRA_CRC,
34458            MISSION_WRITE_PARTIAL_LIST_DATA::ID => MISSION_WRITE_PARTIAL_LIST_DATA::EXTRA_CRC,
34459            MOUNT_ORIENTATION_DATA::ID => MOUNT_ORIENTATION_DATA::EXTRA_CRC,
34460            NAMED_VALUE_FLOAT_DATA::ID => NAMED_VALUE_FLOAT_DATA::EXTRA_CRC,
34461            NAMED_VALUE_INT_DATA::ID => NAMED_VALUE_INT_DATA::EXTRA_CRC,
34462            NAV_CONTROLLER_OUTPUT_DATA::ID => NAV_CONTROLLER_OUTPUT_DATA::EXTRA_CRC,
34463            NAV_FILTER_BIAS_DATA::ID => NAV_FILTER_BIAS_DATA::EXTRA_CRC,
34464            OBSTACLE_DISTANCE_DATA::ID => OBSTACLE_DISTANCE_DATA::EXTRA_CRC,
34465            ODOMETRY_DATA::ID => ODOMETRY_DATA::EXTRA_CRC,
34466            ONBOARD_COMPUTER_STATUS_DATA::ID => ONBOARD_COMPUTER_STATUS_DATA::EXTRA_CRC,
34467            OPEN_DRONE_ID_ARM_STATUS_DATA::ID => OPEN_DRONE_ID_ARM_STATUS_DATA::EXTRA_CRC,
34468            OPEN_DRONE_ID_AUTHENTICATION_DATA::ID => OPEN_DRONE_ID_AUTHENTICATION_DATA::EXTRA_CRC,
34469            OPEN_DRONE_ID_BASIC_ID_DATA::ID => OPEN_DRONE_ID_BASIC_ID_DATA::EXTRA_CRC,
34470            OPEN_DRONE_ID_LOCATION_DATA::ID => OPEN_DRONE_ID_LOCATION_DATA::EXTRA_CRC,
34471            OPEN_DRONE_ID_MESSAGE_PACK_DATA::ID => OPEN_DRONE_ID_MESSAGE_PACK_DATA::EXTRA_CRC,
34472            OPEN_DRONE_ID_OPERATOR_ID_DATA::ID => OPEN_DRONE_ID_OPERATOR_ID_DATA::EXTRA_CRC,
34473            OPEN_DRONE_ID_SELF_ID_DATA::ID => OPEN_DRONE_ID_SELF_ID_DATA::EXTRA_CRC,
34474            OPEN_DRONE_ID_SYSTEM_DATA::ID => OPEN_DRONE_ID_SYSTEM_DATA::EXTRA_CRC,
34475            OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::ID => OPEN_DRONE_ID_SYSTEM_UPDATE_DATA::EXTRA_CRC,
34476            OPTICAL_FLOW_DATA::ID => OPTICAL_FLOW_DATA::EXTRA_CRC,
34477            OPTICAL_FLOW_RAD_DATA::ID => OPTICAL_FLOW_RAD_DATA::EXTRA_CRC,
34478            ORBIT_EXECUTION_STATUS_DATA::ID => ORBIT_EXECUTION_STATUS_DATA::EXTRA_CRC,
34479            PARAM_EXT_ACK_DATA::ID => PARAM_EXT_ACK_DATA::EXTRA_CRC,
34480            PARAM_EXT_REQUEST_LIST_DATA::ID => PARAM_EXT_REQUEST_LIST_DATA::EXTRA_CRC,
34481            PARAM_EXT_REQUEST_READ_DATA::ID => PARAM_EXT_REQUEST_READ_DATA::EXTRA_CRC,
34482            PARAM_EXT_SET_DATA::ID => PARAM_EXT_SET_DATA::EXTRA_CRC,
34483            PARAM_EXT_VALUE_DATA::ID => PARAM_EXT_VALUE_DATA::EXTRA_CRC,
34484            PARAM_MAP_RC_DATA::ID => PARAM_MAP_RC_DATA::EXTRA_CRC,
34485            PARAM_REQUEST_LIST_DATA::ID => PARAM_REQUEST_LIST_DATA::EXTRA_CRC,
34486            PARAM_REQUEST_READ_DATA::ID => PARAM_REQUEST_READ_DATA::EXTRA_CRC,
34487            PARAM_SET_DATA::ID => PARAM_SET_DATA::EXTRA_CRC,
34488            PARAM_VALUE_DATA::ID => PARAM_VALUE_DATA::EXTRA_CRC,
34489            PING_DATA::ID => PING_DATA::EXTRA_CRC,
34490            PLAY_TUNE_DATA::ID => PLAY_TUNE_DATA::EXTRA_CRC,
34491            PLAY_TUNE_V2_DATA::ID => PLAY_TUNE_V2_DATA::EXTRA_CRC,
34492            POSITION_TARGET_GLOBAL_INT_DATA::ID => POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC,
34493            POSITION_TARGET_LOCAL_NED_DATA::ID => POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34494            POWER_STATUS_DATA::ID => POWER_STATUS_DATA::EXTRA_CRC,
34495            PROTOCOL_VERSION_DATA::ID => PROTOCOL_VERSION_DATA::EXTRA_CRC,
34496            RADIO_CALIBRATION_DATA::ID => RADIO_CALIBRATION_DATA::EXTRA_CRC,
34497            RADIO_STATUS_DATA::ID => RADIO_STATUS_DATA::EXTRA_CRC,
34498            RAW_IMU_DATA::ID => RAW_IMU_DATA::EXTRA_CRC,
34499            RAW_PRESSURE_DATA::ID => RAW_PRESSURE_DATA::EXTRA_CRC,
34500            RAW_RPM_DATA::ID => RAW_RPM_DATA::EXTRA_CRC,
34501            RC_CHANNELS_DATA::ID => RC_CHANNELS_DATA::EXTRA_CRC,
34502            RC_CHANNELS_OVERRIDE_DATA::ID => RC_CHANNELS_OVERRIDE_DATA::EXTRA_CRC,
34503            RC_CHANNELS_RAW_DATA::ID => RC_CHANNELS_RAW_DATA::EXTRA_CRC,
34504            RC_CHANNELS_SCALED_DATA::ID => RC_CHANNELS_SCALED_DATA::EXTRA_CRC,
34505            REQUEST_DATA_STREAM_DATA::ID => REQUEST_DATA_STREAM_DATA::EXTRA_CRC,
34506            REQUEST_EVENT_DATA::ID => REQUEST_EVENT_DATA::EXTRA_CRC,
34507            RESOURCE_REQUEST_DATA::ID => RESOURCE_REQUEST_DATA::EXTRA_CRC,
34508            RESPONSE_EVENT_ERROR_DATA::ID => RESPONSE_EVENT_ERROR_DATA::EXTRA_CRC,
34509            SAFETY_ALLOWED_AREA_DATA::ID => SAFETY_ALLOWED_AREA_DATA::EXTRA_CRC,
34510            SAFETY_SET_ALLOWED_AREA_DATA::ID => SAFETY_SET_ALLOWED_AREA_DATA::EXTRA_CRC,
34511            SCALED_IMU_DATA::ID => SCALED_IMU_DATA::EXTRA_CRC,
34512            SCALED_IMU2_DATA::ID => SCALED_IMU2_DATA::EXTRA_CRC,
34513            SCALED_IMU3_DATA::ID => SCALED_IMU3_DATA::EXTRA_CRC,
34514            SCALED_PRESSURE_DATA::ID => SCALED_PRESSURE_DATA::EXTRA_CRC,
34515            SCALED_PRESSURE2_DATA::ID => SCALED_PRESSURE2_DATA::EXTRA_CRC,
34516            SCALED_PRESSURE3_DATA::ID => SCALED_PRESSURE3_DATA::EXTRA_CRC,
34517            SERIAL_CONTROL_DATA::ID => SERIAL_CONTROL_DATA::EXTRA_CRC,
34518            SERVO_OUTPUT_RAW_DATA::ID => SERVO_OUTPUT_RAW_DATA::EXTRA_CRC,
34519            SETUP_SIGNING_DATA::ID => SETUP_SIGNING_DATA::EXTRA_CRC,
34520            SET_ACTUATOR_CONTROL_TARGET_DATA::ID => SET_ACTUATOR_CONTROL_TARGET_DATA::EXTRA_CRC,
34521            SET_ATTITUDE_TARGET_DATA::ID => SET_ATTITUDE_TARGET_DATA::EXTRA_CRC,
34522            SET_GPS_GLOBAL_ORIGIN_DATA::ID => SET_GPS_GLOBAL_ORIGIN_DATA::EXTRA_CRC,
34523            SET_HOME_POSITION_DATA::ID => SET_HOME_POSITION_DATA::EXTRA_CRC,
34524            SET_MODE_DATA::ID => SET_MODE_DATA::EXTRA_CRC,
34525            SET_POSITION_TARGET_GLOBAL_INT_DATA::ID => {
34526                SET_POSITION_TARGET_GLOBAL_INT_DATA::EXTRA_CRC
34527            }
34528            SET_POSITION_TARGET_LOCAL_NED_DATA::ID => SET_POSITION_TARGET_LOCAL_NED_DATA::EXTRA_CRC,
34529            SIM_STATE_DATA::ID => SIM_STATE_DATA::EXTRA_CRC,
34530            SMART_BATTERY_INFO_DATA::ID => SMART_BATTERY_INFO_DATA::EXTRA_CRC,
34531            STATUSTEXT_DATA::ID => STATUSTEXT_DATA::EXTRA_CRC,
34532            STORAGE_INFORMATION_DATA::ID => STORAGE_INFORMATION_DATA::EXTRA_CRC,
34533            SUPPORTED_TUNES_DATA::ID => SUPPORTED_TUNES_DATA::EXTRA_CRC,
34534            SYSTEM_TIME_DATA::ID => SYSTEM_TIME_DATA::EXTRA_CRC,
34535            SYS_STATUS_DATA::ID => SYS_STATUS_DATA::EXTRA_CRC,
34536            TERRAIN_CHECK_DATA::ID => TERRAIN_CHECK_DATA::EXTRA_CRC,
34537            TERRAIN_DATA_DATA::ID => TERRAIN_DATA_DATA::EXTRA_CRC,
34538            TERRAIN_REPORT_DATA::ID => TERRAIN_REPORT_DATA::EXTRA_CRC,
34539            TERRAIN_REQUEST_DATA::ID => TERRAIN_REQUEST_DATA::EXTRA_CRC,
34540            TIMESYNC_DATA::ID => TIMESYNC_DATA::EXTRA_CRC,
34541            TIME_ESTIMATE_TO_TARGET_DATA::ID => TIME_ESTIMATE_TO_TARGET_DATA::EXTRA_CRC,
34542            TRAJECTORY_REPRESENTATION_BEZIER_DATA::ID => {
34543                TRAJECTORY_REPRESENTATION_BEZIER_DATA::EXTRA_CRC
34544            }
34545            TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::ID => {
34546                TRAJECTORY_REPRESENTATION_WAYPOINTS_DATA::EXTRA_CRC
34547            }
34548            TUNNEL_DATA::ID => TUNNEL_DATA::EXTRA_CRC,
34549            UALBERTA_SYS_STATUS_DATA::ID => UALBERTA_SYS_STATUS_DATA::EXTRA_CRC,
34550            UAVCAN_NODE_INFO_DATA::ID => UAVCAN_NODE_INFO_DATA::EXTRA_CRC,
34551            UAVCAN_NODE_STATUS_DATA::ID => UAVCAN_NODE_STATUS_DATA::EXTRA_CRC,
34552            UTM_GLOBAL_POSITION_DATA::ID => UTM_GLOBAL_POSITION_DATA::EXTRA_CRC,
34553            V2_EXTENSION_DATA::ID => V2_EXTENSION_DATA::EXTRA_CRC,
34554            VFR_HUD_DATA::ID => VFR_HUD_DATA::EXTRA_CRC,
34555            VIBRATION_DATA::ID => VIBRATION_DATA::EXTRA_CRC,
34556            VICON_POSITION_ESTIMATE_DATA::ID => VICON_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34557            VIDEO_STREAM_INFORMATION_DATA::ID => VIDEO_STREAM_INFORMATION_DATA::EXTRA_CRC,
34558            VIDEO_STREAM_STATUS_DATA::ID => VIDEO_STREAM_STATUS_DATA::EXTRA_CRC,
34559            VISION_POSITION_ESTIMATE_DATA::ID => VISION_POSITION_ESTIMATE_DATA::EXTRA_CRC,
34560            VISION_SPEED_ESTIMATE_DATA::ID => VISION_SPEED_ESTIMATE_DATA::EXTRA_CRC,
34561            WHEEL_DISTANCE_DATA::ID => WHEEL_DISTANCE_DATA::EXTRA_CRC,
34562            WIFI_CONFIG_AP_DATA::ID => WIFI_CONFIG_AP_DATA::EXTRA_CRC,
34563            WINCH_STATUS_DATA::ID => WINCH_STATUS_DATA::EXTRA_CRC,
34564            WIND_COV_DATA::ID => WIND_COV_DATA::EXTRA_CRC,
34565            _ => 0,
34566        }
34567    }
34568    fn target_system_id(&self) -> Option<u8> {
34569        match self {
34570            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_system),
34571            Self::CANFD_FRAME(inner) => Some(inner.target_system),
34572            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_system),
34573            Self::CAN_FRAME(inner) => Some(inner.target_system),
34574            Self::CHANGE_OPERATOR_CONTROL(inner) => Some(inner.target_system),
34575            Self::COMMAND_ACK(inner) => Some(inner.target_system),
34576            Self::COMMAND_CANCEL(inner) => Some(inner.target_system),
34577            Self::COMMAND_INT(inner) => Some(inner.target_system),
34578            Self::COMMAND_LONG(inner) => Some(inner.target_system),
34579            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_system),
34580            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_system),
34581            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_system),
34582            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_system),
34583            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_system),
34584            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_system),
34585            Self::GPS_INJECT_DATA(inner) => Some(inner.target_system),
34586            Self::LOGGING_ACK(inner) => Some(inner.target_system),
34587            Self::LOGGING_DATA(inner) => Some(inner.target_system),
34588            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_system),
34589            Self::LOG_ERASE(inner) => Some(inner.target_system),
34590            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_system),
34591            Self::LOG_REQUEST_END(inner) => Some(inner.target_system),
34592            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_system),
34593            Self::MISSION_ACK(inner) => Some(inner.target_system),
34594            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_system),
34595            Self::MISSION_COUNT(inner) => Some(inner.target_system),
34596            Self::MISSION_ITEM(inner) => Some(inner.target_system),
34597            Self::MISSION_ITEM_INT(inner) => Some(inner.target_system),
34598            Self::MISSION_REQUEST(inner) => Some(inner.target_system),
34599            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_system),
34600            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_system),
34601            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_system),
34602            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_system),
34603            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_system),
34604            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_system),
34605            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_system),
34606            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_system),
34607            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_system),
34608            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_system),
34609            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_system),
34610            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_system),
34611            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_system),
34612            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_system),
34613            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_system),
34614            Self::PARAM_EXT_SET(inner) => Some(inner.target_system),
34615            Self::PARAM_MAP_RC(inner) => Some(inner.target_system),
34616            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_system),
34617            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_system),
34618            Self::PARAM_SET(inner) => Some(inner.target_system),
34619            Self::PING(inner) => Some(inner.target_system),
34620            Self::PLAY_TUNE(inner) => Some(inner.target_system),
34621            Self::PLAY_TUNE_V2(inner) => Some(inner.target_system),
34622            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_system),
34623            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_system),
34624            Self::REQUEST_EVENT(inner) => Some(inner.target_system),
34625            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_system),
34626            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_system),
34627            Self::SERIAL_CONTROL(inner) => Some(inner.target_system),
34628            Self::SETUP_SIGNING(inner) => Some(inner.target_system),
34629            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_system),
34630            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_system),
34631            Self::SET_GPS_GLOBAL_ORIGIN(inner) => Some(inner.target_system),
34632            Self::SET_HOME_POSITION(inner) => Some(inner.target_system),
34633            Self::SET_MODE(inner) => Some(inner.target_system),
34634            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_system),
34635            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_system),
34636            Self::SUPPORTED_TUNES(inner) => Some(inner.target_system),
34637            Self::TIMESYNC(inner) => Some(inner.target_system),
34638            Self::TUNNEL(inner) => Some(inner.target_system),
34639            Self::V2_EXTENSION(inner) => Some(inner.target_system),
34640            _ => None,
34641        }
34642    }
34643    fn target_component_id(&self) -> Option<u8> {
34644        match self {
34645            Self::AUTOPILOT_STATE_FOR_GIMBAL_DEVICE(inner) => Some(inner.target_component),
34646            Self::CANFD_FRAME(inner) => Some(inner.target_component),
34647            Self::CAN_FILTER_MODIFY(inner) => Some(inner.target_component),
34648            Self::CAN_FRAME(inner) => Some(inner.target_component),
34649            Self::COMMAND_ACK(inner) => Some(inner.target_component),
34650            Self::COMMAND_CANCEL(inner) => Some(inner.target_component),
34651            Self::COMMAND_INT(inner) => Some(inner.target_component),
34652            Self::COMMAND_LONG(inner) => Some(inner.target_component),
34653            Self::FILE_TRANSFER_PROTOCOL(inner) => Some(inner.target_component),
34654            Self::GIMBAL_DEVICE_ATTITUDE_STATUS(inner) => Some(inner.target_component),
34655            Self::GIMBAL_DEVICE_SET_ATTITUDE(inner) => Some(inner.target_component),
34656            Self::GIMBAL_MANAGER_SET_ATTITUDE(inner) => Some(inner.target_component),
34657            Self::GIMBAL_MANAGER_SET_MANUAL_CONTROL(inner) => Some(inner.target_component),
34658            Self::GIMBAL_MANAGER_SET_PITCHYAW(inner) => Some(inner.target_component),
34659            Self::GPS_INJECT_DATA(inner) => Some(inner.target_component),
34660            Self::LOGGING_ACK(inner) => Some(inner.target_component),
34661            Self::LOGGING_DATA(inner) => Some(inner.target_component),
34662            Self::LOGGING_DATA_ACKED(inner) => Some(inner.target_component),
34663            Self::LOG_ERASE(inner) => Some(inner.target_component),
34664            Self::LOG_REQUEST_DATA(inner) => Some(inner.target_component),
34665            Self::LOG_REQUEST_END(inner) => Some(inner.target_component),
34666            Self::LOG_REQUEST_LIST(inner) => Some(inner.target_component),
34667            Self::MISSION_ACK(inner) => Some(inner.target_component),
34668            Self::MISSION_CLEAR_ALL(inner) => Some(inner.target_component),
34669            Self::MISSION_COUNT(inner) => Some(inner.target_component),
34670            Self::MISSION_ITEM(inner) => Some(inner.target_component),
34671            Self::MISSION_ITEM_INT(inner) => Some(inner.target_component),
34672            Self::MISSION_REQUEST(inner) => Some(inner.target_component),
34673            Self::MISSION_REQUEST_INT(inner) => Some(inner.target_component),
34674            Self::MISSION_REQUEST_LIST(inner) => Some(inner.target_component),
34675            Self::MISSION_REQUEST_PARTIAL_LIST(inner) => Some(inner.target_component),
34676            Self::MISSION_SET_CURRENT(inner) => Some(inner.target_component),
34677            Self::MISSION_WRITE_PARTIAL_LIST(inner) => Some(inner.target_component),
34678            Self::OPEN_DRONE_ID_AUTHENTICATION(inner) => Some(inner.target_component),
34679            Self::OPEN_DRONE_ID_BASIC_ID(inner) => Some(inner.target_component),
34680            Self::OPEN_DRONE_ID_LOCATION(inner) => Some(inner.target_component),
34681            Self::OPEN_DRONE_ID_MESSAGE_PACK(inner) => Some(inner.target_component),
34682            Self::OPEN_DRONE_ID_OPERATOR_ID(inner) => Some(inner.target_component),
34683            Self::OPEN_DRONE_ID_SELF_ID(inner) => Some(inner.target_component),
34684            Self::OPEN_DRONE_ID_SYSTEM(inner) => Some(inner.target_component),
34685            Self::OPEN_DRONE_ID_SYSTEM_UPDATE(inner) => Some(inner.target_component),
34686            Self::PARAM_EXT_REQUEST_LIST(inner) => Some(inner.target_component),
34687            Self::PARAM_EXT_REQUEST_READ(inner) => Some(inner.target_component),
34688            Self::PARAM_EXT_SET(inner) => Some(inner.target_component),
34689            Self::PARAM_MAP_RC(inner) => Some(inner.target_component),
34690            Self::PARAM_REQUEST_LIST(inner) => Some(inner.target_component),
34691            Self::PARAM_REQUEST_READ(inner) => Some(inner.target_component),
34692            Self::PARAM_SET(inner) => Some(inner.target_component),
34693            Self::PING(inner) => Some(inner.target_component),
34694            Self::PLAY_TUNE(inner) => Some(inner.target_component),
34695            Self::PLAY_TUNE_V2(inner) => Some(inner.target_component),
34696            Self::RC_CHANNELS_OVERRIDE(inner) => Some(inner.target_component),
34697            Self::REQUEST_DATA_STREAM(inner) => Some(inner.target_component),
34698            Self::REQUEST_EVENT(inner) => Some(inner.target_component),
34699            Self::RESPONSE_EVENT_ERROR(inner) => Some(inner.target_component),
34700            Self::SAFETY_SET_ALLOWED_AREA(inner) => Some(inner.target_component),
34701            Self::SERIAL_CONTROL(inner) => Some(inner.target_component),
34702            Self::SETUP_SIGNING(inner) => Some(inner.target_component),
34703            Self::SET_ACTUATOR_CONTROL_TARGET(inner) => Some(inner.target_component),
34704            Self::SET_ATTITUDE_TARGET(inner) => Some(inner.target_component),
34705            Self::SET_POSITION_TARGET_GLOBAL_INT(inner) => Some(inner.target_component),
34706            Self::SET_POSITION_TARGET_LOCAL_NED(inner) => Some(inner.target_component),
34707            Self::SUPPORTED_TUNES(inner) => Some(inner.target_component),
34708            Self::TIMESYNC(inner) => Some(inner.target_component),
34709            Self::TUNNEL(inner) => Some(inner.target_component),
34710            Self::V2_EXTENSION(inner) => Some(inner.target_component),
34711            _ => None,
34712        }
34713    }
34714}